{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "f513b248",
   "metadata": {},
   "source": [
    "## 11.6. 动量法"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "183bd5a0",
   "metadata": {},
   "source": [
    "#### 11.6.1.2. 条件不佳的问题"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "acc8a83f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch 20, x1: -0.943467, x2: -0.000073\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"245.120313pt\" height=\"180.65625pt\" viewBox=\"0 0 245.120313 180.65625\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:05:20.331534</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 180.65625 \n",
       "L 245.120313 180.65625 \n",
       "L 245.120313 0 \n",
       "L 0 0 \n",
       "L 0 180.65625 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 237.920313 143.1 \n",
       "L 237.920313 7.2 \n",
       "L 42.620312 7.2 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"m947ee574b3\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m947ee574b3\" x=\"88.393749\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- −4 -->\n",
       "      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m947ee574b3\" x=\"149.424998\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- −2 -->\n",
       "      <g transform=\"translate(142.053905 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m947ee574b3\" x=\"210.456247\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(207.274997 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_4\">\n",
       "     <!-- x1 -->\n",
       "     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
       "L 2247 1797 \n",
       "L 3578 0 \n",
       "L 2900 0 \n",
       "L 1881 1375 \n",
       "L 863 0 \n",
       "L 184 0 \n",
       "L 1544 1831 \n",
       "L 300 3500 \n",
       "L 978 3500 \n",
       "L 1906 2253 \n",
       "L 2834 3500 \n",
       "L 3513 3500 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <defs>\n",
       "       <path id=\"m55e5dbbc7b\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m55e5dbbc7b\" x=\"42.620312\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- −3 -->\n",
       "      <g transform=\"translate(20.878125 146.899219)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m55e5dbbc7b\" x=\"42.620312\" y=\"112.283673\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- −2 -->\n",
       "      <g transform=\"translate(20.878125 116.082892)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m55e5dbbc7b\" x=\"42.620312\" y=\"81.467347\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- −1 -->\n",
       "      <g transform=\"translate(20.878125 85.266566)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m55e5dbbc7b\" x=\"42.620312\" y=\"50.65102\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(29.257812 54.450239)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m55e5dbbc7b\" x=\"42.620312\" y=\"19.834694\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 1 -->\n",
       "      <g transform=\"translate(29.257812 23.633913)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_10\">\n",
       "     <!-- x2 -->\n",
       "     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-32\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_9\">\n",
       "    <path d=\"M 57.878125 112.283673 \n",
       "L 70.084375 13.671429 \n",
       "L 81.314124 72.838776 \n",
       "L 91.645494 37.338367 \n",
       "L 101.150355 58.638612 \n",
       "L 109.894826 45.858465 \n",
       "L 117.93974 53.526553 \n",
       "L 125.34106 48.925701 \n",
       "L 132.150275 51.686212 \n",
       "L 138.414753 50.029905 \n",
       "L 144.178073 51.023689 \n",
       "L 149.480327 50.427419 \n",
       "L 154.3584 50.785181 \n",
       "L 158.846228 50.570524 \n",
       "L 162.97503 50.699318 \n",
       "L 166.773527 50.622042 \n",
       "L 170.268145 50.668408 \n",
       "L 173.483193 50.640588 \n",
       "L 176.441037 50.65728 \n",
       "L 179.162254 50.647265 \n",
       "L 181.665774 50.653274 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"md00cebdf70\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #ff7f0e\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#p0105d53b2c)\">\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"57.878125\" y=\"112.283673\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"70.084375\" y=\"13.671429\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"81.314124\" y=\"72.838776\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"91.645494\" y=\"37.338367\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"101.150355\" y=\"58.638612\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"109.894826\" y=\"45.858465\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"117.93974\" y=\"53.526553\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"125.34106\" y=\"48.925701\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"132.150275\" y=\"51.686212\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"138.414753\" y=\"50.029905\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"144.178073\" y=\"51.023689\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"149.480327\" y=\"50.427419\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"154.3584\" y=\"50.785181\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"158.846228\" y=\"50.570524\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"162.97503\" y=\"50.699318\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"166.773527\" y=\"50.622042\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"170.268145\" y=\"50.668408\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"173.483193\" y=\"50.640588\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"176.441037\" y=\"50.65728\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"179.162254\" y=\"50.647265\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#md00cebdf70\" x=\"181.665774\" y=\"50.653274\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_1\">\n",
       "    <path d=\"M 210.456247 50.65102 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_2\">\n",
       "    <path d=\"M 237.920312 87.870979 \n",
       "L 234.868753 87.975754 \n",
       "L 231.817193 88.068204 \n",
       "L 228.765619 88.148327 \n",
       "L 225.71406 88.216122 \n",
       "L 222.6625 88.271592 \n",
       "L 219.610941 88.314734 \n",
       "L 216.559381 88.345552 \n",
       "L 213.507807 88.364041 \n",
       "L 210.456247 88.370204 \n",
       "L 207.404688 88.364041 \n",
       "L 204.353128 88.345552 \n",
       "L 201.301569 88.314734 \n",
       "L 198.249995 88.271592 \n",
       "L 195.198435 88.216122 \n",
       "L 192.146876 88.148327 \n",
       "L 189.095316 88.068204 \n",
       "L 186.043757 87.975756 \n",
       "L 182.992182 87.870979 \n",
       "L 179.940623 87.753878 \n",
       "L 177.03433 87.63061 \n",
       "L 176.889063 87.623913 \n",
       "L 173.837504 87.469831 \n",
       "L 170.785944 87.302352 \n",
       "L 167.73437 87.121472 \n",
       "L 164.682811 86.927197 \n",
       "L 161.631251 86.719521 \n",
       "L 158.579684 86.498447 \n",
       "L 155.528125 86.263976 \n",
       "L 152.476565 86.016105 \n",
       "L 149.424998 85.754835 \n",
       "L 146.373439 85.480169 \n",
       "L 143.321872 85.192103 \n",
       "L 140.270312 84.890639 \n",
       "L 137.218753 84.575777 \n",
       "L 136.969649 84.54898 \n",
       "L 134.167186 84.218805 \n",
       "L 131.115627 83.844607 \n",
       "L 128.06406 83.455733 \n",
       "L 125.0125 83.052187 \n",
       "L 121.960941 82.633966 \n",
       "L 118.909374 82.201068 \n",
       "L 115.857814 81.753499 \n",
       "L 113.968754 81.467347 \n",
       "L 112.806247 81.272716 \n",
       "L 109.754688 80.745596 \n",
       "L 106.703128 80.202255 \n",
       "L 103.651562 79.642696 \n",
       "L 100.600002 79.066918 \n",
       "L 97.548443 78.47492 \n",
       "L 97.100855 78.38571 \n",
       "L 94.496876 77.805641 \n",
       "L 91.445309 77.107741 \n",
       "L 88.393749 76.391716 \n",
       "L 85.34219 75.657562 \n",
       "L 83.908318 75.30408 \n",
       "L 82.29063 74.852111 \n",
       "L 79.239056 73.978976 \n",
       "L 76.187497 73.085304 \n",
       "L 73.307377 72.22245 \n",
       "L 73.135937 72.163187 \n",
       "L 70.084378 71.084615 \n",
       "L 67.032818 69.98234 \n",
       "L 64.752163 69.140813 \n",
       "L 63.981244 68.804636 \n",
       "L 60.929684 67.445918 \n",
       "L 57.878125 66.059184 \n",
       "L 54.826565 64.330049 \n",
       "L 52.486033 62.977547 \n",
       "L 51.775006 62.449278 \n",
       "L 48.723432 60.138039 \n",
       "L 48.409729 59.895917 \n",
       "L 45.671872 56.937551 \n",
       "L 45.55989 56.814287 \n",
       "L 43.880133 53.73265 \n",
       "L 43.320214 50.65102 \n",
       "L 43.880133 47.569383 \n",
       "L 45.55989 44.487754 \n",
       "L 45.671872 44.36449 \n",
       "L 48.409729 41.406124 \n",
       "L 48.723432 41.164003 \n",
       "L 51.775006 38.852766 \n",
       "L 52.486047 38.324487 \n",
       "L 54.826565 36.971993 \n",
       "L 57.878125 35.242857 \n",
       "L 60.929684 33.856122 \n",
       "L 63.981244 32.497404 \n",
       "L 64.752179 32.16122 \n",
       "L 67.032818 31.3197 \n",
       "L 70.084378 30.217425 \n",
       "L 73.135937 29.138854 \n",
       "L 73.307377 29.07959 \n",
       "L 76.187497 28.216737 \n",
       "L 79.239056 27.323065 \n",
       "L 82.29063 26.44993 \n",
       "L 83.908318 25.997961 \n",
       "L 85.34219 25.644479 \n",
       "L 88.393749 24.910324 \n",
       "L 91.445309 24.1943 \n",
       "L 94.496876 23.496399 \n",
       "L 97.100893 22.916324 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_3\">\n",
       "    <path d=\"M 237.920312 103.6507 \n",
       "L 234.868753 103.725538 \n",
       "L 231.817193 103.791573 \n",
       "L 228.765619 103.848805 \n",
       "L 225.71406 103.897229 \n",
       "L 222.6625 103.936852 \n",
       "L 219.610941 103.967668 \n",
       "L 216.559381 103.989678 \n",
       "L 213.507807 104.002886 \n",
       "L 210.456247 104.007288 \n",
       "L 207.404688 104.002886 \n",
       "L 204.353128 103.989678 \n",
       "L 201.301569 103.967668 \n",
       "L 198.249995 103.936852 \n",
       "L 195.198435 103.897229 \n",
       "L 192.146876 103.848805 \n",
       "L 189.095316 103.791575 \n",
       "L 186.043757 103.725538 \n",
       "L 182.992182 103.6507 \n",
       "L 179.940623 103.567055 \n",
       "L 176.889063 103.474606 \n",
       "L 173.837504 103.373352 \n",
       "L 170.785944 103.263293 \n",
       "L 167.73437 103.14443 \n",
       "L 165.208907 103.038773 \n",
       "L 164.682811 103.015429 \n",
       "L 161.631251 102.870685 \n",
       "L 158.579684 102.716604 \n",
       "L 155.528125 102.553185 \n",
       "L 152.476565 102.380425 \n",
       "L 149.424998 102.198329 \n",
       "L 146.373439 102.006895 \n",
       "L 143.321872 101.806121 \n",
       "L 140.270312 101.596011 \n",
       "L 137.218753 101.376562 \n",
       "L 134.167186 101.147773 \n",
       "L 131.115627 100.909646 \n",
       "L 128.06406 100.662182 \n",
       "L 125.0125 100.40538 \n",
       "L 121.960941 100.139238 \n",
       "L 119.943827 99.957144 \n",
       "L 118.909374 99.857734 \n",
       "L 115.857814 99.554542 \n",
       "L 112.806247 99.241407 \n",
       "L 109.754688 98.918333 \n",
       "L 106.703128 98.585318 \n",
       "L 103.651562 98.242363 \n",
       "L 100.600002 97.889466 \n",
       "L 97.548443 97.526629 \n",
       "L 94.496876 97.15385 \n",
       "L 92.277554 96.87551 \n",
       "L 91.445309 96.763934 \n",
       "L 88.393749 96.344195 \n",
       "L 85.34219 95.913829 \n",
       "L 82.29063 95.472837 \n",
       "L 79.239056 95.021217 \n",
       "L 76.187497 94.558972 \n",
       "L 73.135937 94.086102 \n",
       "L 71.291579 93.793877 \n",
       "L 70.084378 93.588436 \n",
       "L 67.032818 93.05771 \n",
       "L 63.981244 92.51557 \n",
       "L 60.929684 91.962018 \n",
       "L 57.878125 91.397052 \n",
       "L 54.826565 90.820674 \n",
       "L 54.263641 90.712243 \n",
       "L 51.775006 90.194531 \n",
       "L 48.723432 89.547385 \n",
       "L 45.671872 88.887919 \n",
       "L 42.620312 88.216122 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_4\">\n",
       "    <path d=\"M 237.920312 115.720052 \n",
       "L 234.868753 115.780969 \n",
       "L 231.817193 115.83472 \n",
       "L 228.765619 115.881301 \n",
       "L 225.71406 115.920719 \n",
       "L 222.6625 115.952968 \n",
       "L 219.610941 115.978051 \n",
       "L 216.559381 115.995968 \n",
       "L 213.507807 116.006716 \n",
       "L 210.456247 116.0103 \n",
       "L 207.404688 116.006716 \n",
       "L 204.353128 115.995968 \n",
       "L 201.301569 115.978051 \n",
       "L 198.249995 115.952968 \n",
       "L 195.198435 115.920719 \n",
       "L 192.146876 115.881301 \n",
       "L 189.095316 115.83472 \n",
       "L 186.043757 115.780969 \n",
       "L 182.992182 115.720052 \n",
       "L 179.940623 115.65197 \n",
       "L 176.889063 115.576721 \n",
       "L 173.837504 115.494306 \n",
       "L 170.785944 115.404725 \n",
       "L 169.542551 115.365303 \n",
       "L 167.73437 115.305178 \n",
       "L 164.682811 115.196192 \n",
       "L 161.631251 115.079695 \n",
       "L 158.579684 114.955678 \n",
       "L 155.528125 114.824141 \n",
       "L 152.476565 114.685093 \n",
       "L 149.424998 114.538529 \n",
       "L 146.373439 114.384446 \n",
       "L 143.321872 114.222848 \n",
       "L 140.270312 114.053733 \n",
       "L 137.218753 113.877103 \n",
       "L 134.167186 113.692958 \n",
       "L 131.115627 113.501296 \n",
       "L 128.06406 113.302116 \n",
       "L 125.0125 113.09542 \n",
       "L 121.960941 112.881211 \n",
       "L 118.909374 112.659484 \n",
       "L 115.857814 112.430238 \n",
       "L 113.968762 112.283673 \n",
       "L 112.806247 112.188853 \n",
       "L 109.754688 111.932052 \n",
       "L 106.703128 111.667347 \n",
       "L 103.651562 111.39474 \n",
       "L 100.600002 111.114235 \n",
       "L 97.548443 110.825825 \n",
       "L 94.496876 110.529514 \n",
       "L 91.445309 110.2253 \n",
       "L 88.393749 109.913187 \n",
       "L 85.34219 109.593171 \n",
       "L 82.29063 109.265256 \n",
       "L 81.716196 109.20204 \n",
       "L 79.239056 108.914698 \n",
       "L 76.187497 108.552399 \n",
       "L 73.135937 108.181771 \n",
       "L 70.084378 107.802814 \n",
       "L 67.032818 107.415528 \n",
       "L 63.981244 107.019912 \n",
       "L 60.929684 106.615968 \n",
       "L 57.878125 106.203696 \n",
       "L 57.273841 106.120407 \n",
       "L 54.826565 105.76382 \n",
       "L 51.775006 105.310381 \n",
       "L 48.723432 104.848134 \n",
       "L 45.671872 104.377083 \n",
       "L 42.620312 103.897228 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_5\">\n",
       "    <path d=\"M 237.920312 125.864869 \n",
       "L 234.868753 125.918326 \n",
       "L 231.817193 125.965495 \n",
       "L 228.765619 126.006372 \n",
       "L 225.71406 126.040964 \n",
       "L 222.6625 126.069264 \n",
       "L 219.610941 126.091276 \n",
       "L 216.559381 126.106999 \n",
       "L 213.507807 126.11643 \n",
       "L 210.456247 126.119576 \n",
       "L 207.404688 126.11643 \n",
       "L 204.353128 126.106999 \n",
       "L 201.301569 126.091276 \n",
       "L 198.249995 126.069264 \n",
       "L 195.198435 126.040964 \n",
       "L 192.146876 126.006372 \n",
       "L 189.095316 125.965495 \n",
       "L 186.043757 125.918326 \n",
       "L 182.992182 125.864869 \n",
       "L 179.940623 125.805123 \n",
       "L 176.889063 125.739088 \n",
       "L 173.837504 125.666765 \n",
       "L 170.785944 125.588153 \n",
       "L 167.73437 125.503249 \n",
       "L 164.682811 125.412057 \n",
       "L 161.631251 125.31458 \n",
       "L 158.579684 125.210811 \n",
       "L 155.528125 125.10075 \n",
       "L 152.476565 124.984403 \n",
       "L 149.424998 124.861769 \n",
       "L 146.373439 124.732842 \n",
       "L 143.605784 124.610207 \n",
       "L 143.321872 124.597092 \n",
       "L 140.270312 124.449566 \n",
       "L 137.218753 124.295485 \n",
       "L 134.167186 124.134847 \n",
       "L 131.115627 123.967653 \n",
       "L 128.06406 123.7939 \n",
       "L 125.0125 123.61359 \n",
       "L 121.960941 123.426728 \n",
       "L 118.909374 123.233306 \n",
       "L 115.857814 123.033325 \n",
       "L 112.806247 122.82679 \n",
       "L 109.754688 122.6137 \n",
       "L 106.703128 122.39405 \n",
       "L 103.651562 122.167844 \n",
       "L 100.600002 121.935085 \n",
       "L 97.548443 121.695767 \n",
       "L 95.473374 121.52857 \n",
       "L 94.496876 121.446393 \n",
       "L 91.445309 121.182743 \n",
       "L 88.393749 120.912243 \n",
       "L 85.34219 120.634898 \n",
       "L 82.29063 120.350703 \n",
       "L 79.239056 120.05966 \n",
       "L 76.187497 119.761769 \n",
       "L 73.135937 119.457031 \n",
       "L 70.084378 119.145442 \n",
       "L 67.032818 118.827008 \n",
       "L 63.981244 118.501724 \n",
       "L 63.477901 118.44694 \n",
       "L 60.929684 118.156692 \n",
       "L 57.878125 117.801947 \n",
       "L 54.826565 117.440035 \n",
       "L 51.775006 117.070957 \n",
       "L 48.723432 116.694709 \n",
       "L 45.671872 116.311296 \n",
       "L 42.620312 115.920717 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_6\">\n",
       "    <path d=\"M 237.920312 134.804804 \n",
       "L 234.868753 134.85243 \n",
       "L 231.817193 134.894453 \n",
       "L 228.765619 134.930871 \n",
       "L 225.71406 134.961689 \n",
       "L 222.6625 134.986902 \n",
       "L 219.610941 135.006512 \n",
       "L 216.559381 135.02052 \n",
       "L 213.507807 135.028922 \n",
       "L 210.456247 135.031725 \n",
       "L 207.404688 135.028922 \n",
       "L 204.353128 135.02052 \n",
       "L 201.301569 135.006512 \n",
       "L 198.249995 134.986902 \n",
       "L 195.198435 134.961689 \n",
       "L 192.146876 134.930871 \n",
       "L 189.095316 134.894453 \n",
       "L 186.043757 134.85243 \n",
       "L 182.992182 134.804804 \n",
       "L 179.940623 134.751575 \n",
       "L 176.889063 134.692744 \n",
       "L 173.837504 134.628311 \n",
       "L 170.785944 134.558275 \n",
       "L 167.73437 134.482634 \n",
       "L 164.682811 134.40139 \n",
       "L 161.631251 134.314546 \n",
       "L 158.579684 134.222097 \n",
       "L 155.528125 134.124043 \n",
       "L 152.476565 134.020389 \n",
       "L 149.424998 133.911132 \n",
       "L 147.936483 133.855104 \n",
       "L 146.373439 133.79405 \n",
       "L 143.321872 133.66904 \n",
       "L 140.270312 133.538216 \n",
       "L 137.218753 133.401577 \n",
       "L 134.167186 133.259125 \n",
       "L 131.115627 133.110859 \n",
       "L 128.06406 132.956776 \n",
       "L 125.0125 132.79688 \n",
       "L 121.960941 132.631172 \n",
       "L 118.909374 132.459647 \n",
       "L 115.857814 132.282307 \n",
       "L 112.806247 132.099153 \n",
       "L 109.754688 131.910186 \n",
       "L 106.703128 131.715403 \n",
       "L 103.651562 131.514805 \n",
       "L 100.600002 131.308397 \n",
       "L 97.548443 131.096171 \n",
       "L 94.496876 130.878129 \n",
       "L 93.070115 130.773466 \n",
       "L 91.445309 130.649601 \n",
       "L 88.393749 130.410924 \n",
       "L 85.34219 130.166208 \n",
       "L 82.29063 129.915447 \n",
       "L 79.239056 129.658644 \n",
       "L 76.187497 129.3958 \n",
       "L 73.135937 129.126913 \n",
       "L 70.084378 128.851981 \n",
       "L 67.032818 128.57101 \n",
       "L 63.981244 128.283994 \n",
       "L 60.929684 127.990936 \n",
       "L 57.878125 127.691837 \n",
       "L 54.826565 127.374241 \n",
       "L 51.775006 127.050356 \n",
       "L 48.723432 126.72018 \n",
       "L 45.671872 126.383715 \n",
       "L 42.620312 126.040964 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_7\">\n",
       "    <path d=\"M 210.456247 143.1 \n",
       "L 207.404688 143.09739 \n",
       "L 204.353128 143.089555 \n",
       "L 201.301569 143.076494 \n",
       "L 198.249995 143.058213 \n",
       "L 195.198435 143.034712 \n",
       "L 192.146876 143.005986 \n",
       "L 189.095316 142.972034 \n",
       "L 186.043757 142.932863 \n",
       "L 182.992182 142.888466 \n",
       "L 179.940623 142.838844 \n",
       "L 176.889063 142.784001 \n",
       "L 173.837504 142.723939 \n",
       "L 170.785944 142.658646 \n",
       "L 167.73437 142.588138 \n",
       "L 164.682811 142.512399 \n",
       "L 161.631251 142.431441 \n",
       "L 158.579684 142.345262 \n",
       "L 155.528125 142.253858 \n",
       "L 152.476565 142.157229 \n",
       "L 149.424998 142.055379 \n",
       "L 146.373439 141.948305 \n",
       "L 143.321872 141.83601 \n",
       "L 140.270312 141.71849 \n",
       "L 137.218753 141.595744 \n",
       "L 134.167186 141.467779 \n",
       "L 131.115627 141.334588 \n",
       "L 128.06406 141.196177 \n",
       "L 125.0125 141.052541 \n",
       "L 121.960941 140.903684 \n",
       "L 118.909374 140.749602 \n",
       "L 115.857814 140.590295 \n",
       "L 112.806247 140.425768 \n",
       "L 109.754688 140.256016 \n",
       "L 106.703128 140.081043 \n",
       "L 105.641795 140.01837 \n",
       "L 103.651562 139.896722 \n",
       "L 100.600002 139.704798 \n",
       "L 97.548443 139.507465 \n",
       "L 94.496876 139.304725 \n",
       "L 91.445309 139.096579 \n",
       "L 88.393749 138.883028 \n",
       "L 85.34219 138.66407 \n",
       "L 82.29063 138.439707 \n",
       "L 79.239056 138.209934 \n",
       "L 76.187497 137.974758 \n",
       "L 73.135937 137.734174 \n",
       "L 70.084378 137.488185 \n",
       "L 67.032818 137.236787 \n",
       "L 63.981244 136.979986 \n",
       "L 63.477871 136.936733 \n",
       "L 60.929684 136.709815 \n",
       "L 57.878125 136.432465 \n",
       "L 54.826565 136.149521 \n",
       "L 51.775006 135.860966 \n",
       "L 48.723432 135.566806 \n",
       "L 45.671872 135.267051 \n",
       "L 42.620312 134.961686 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "    <path d=\"M 237.920312 142.888466 \n",
       "L 234.868753 142.932863 \n",
       "L 231.817193 142.972034 \n",
       "L 228.765619 143.005986 \n",
       "L 225.71406 143.034712 \n",
       "L 222.6625 143.058213 \n",
       "L 219.610941 143.076494 \n",
       "L 216.559381 143.089555 \n",
       "L 213.507807 143.09739 \n",
       "L 210.456247 143.1 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_8\">\n",
       "    <path d=\"M 43.320206 143.1 \n",
       "L 42.620312 143.034712 \n",
       "\" clip-path=\"url(#p0105d53b2c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_9\"/>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 42.620312 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 237.920313 143.1 \n",
       "L 237.920313 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 237.920312 143.1 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 42.620312 7.2 \n",
       "L 237.920312 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p0105d53b2c\">\n",
       "   <rect x=\"42.620312\" y=\"7.2\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import mindspore\n",
    "from d2l import mindspore as d2l\n",
    "\n",
    "eta = 0.4\n",
    "def f_2d(x1, x2):\n",
    "    return 0.1 * x1 ** 2 + 2 * x2 ** 2\n",
    "def gd_2d(x1, x2, s1, s2):\n",
    "    return (x1 - eta * 0.2 * x1, x2 - eta * 4 * x2, 0, 0)\n",
    "\n",
    "d2l.show_trace_2d(f_2d, d2l.train_2d(gd_2d))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "41a1fdb3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch 20, x1: -0.387814, x2: -1673.365109\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"264.207812pt\" height=\"180.65625pt\" viewBox=\"0 0 264.207812 180.65625\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:05:26.315910</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 180.65625 \n",
       "L 264.207812 180.65625 \n",
       "L 264.207812 0 \n",
       "L 0 0 \n",
       "L 0 180.65625 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 61.707813 143.1 \n",
       "L 257.007812 143.1 \n",
       "L 257.007812 7.2 \n",
       "L 61.707813 7.2 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"mc1794391d7\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mc1794391d7\" x=\"107.481249\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- −4 -->\n",
       "      <g transform=\"translate(100.110156 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mc1794391d7\" x=\"168.512498\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- −2 -->\n",
       "      <g transform=\"translate(161.141405 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mc1794391d7\" x=\"229.543747\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(226.362497 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_4\">\n",
       "     <!-- x1 -->\n",
       "     <g transform=\"translate(153.217188 171.376563)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
       "L 2247 1797 \n",
       "L 3578 0 \n",
       "L 2900 0 \n",
       "L 1881 1375 \n",
       "L 863 0 \n",
       "L 184 0 \n",
       "L 1544 1831 \n",
       "L 300 3500 \n",
       "L 978 3500 \n",
       "L 1906 2253 \n",
       "L 2834 3500 \n",
       "L 3513 3500 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <defs>\n",
       "       <path id=\"m7d109bc1fc\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m7d109bc1fc\" x=\"61.707813\" y=\"107.922362\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- −1000 -->\n",
       "      <g transform=\"translate(20.878125 111.721581)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-31\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"211.035156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"274.658203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m7d109bc1fc\" x=\"61.707813\" y=\"64.854545\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(48.345313 68.653764)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m7d109bc1fc\" x=\"61.707813\" y=\"21.786729\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 1000 -->\n",
       "      <g transform=\"translate(29.257812 25.585947)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"190.869141\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_8\">\n",
       "     <!-- x2 -->\n",
       "     <g transform=\"translate(14.798438 81.290625)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-32\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_7\">\n",
       "    <path d=\"M 76.965625 64.940681 \n",
       "L 95.274999 64.733956 \n",
       "L 111.387249 65.023371 \n",
       "L 125.566029 64.618189 \n",
       "L 138.043355 65.185444 \n",
       "L 149.023402 64.391287 \n",
       "L 158.685844 65.503107 \n",
       "L 167.188792 63.94656 \n",
       "L 174.671387 66.125726 \n",
       "L 181.25607 63.074893 \n",
       "L 187.050591 67.346059 \n",
       "L 192.14977 61.366427 \n",
       "L 196.637047 69.737912 \n",
       "L 200.585851 58.017833 \n",
       "L 204.060799 74.425943 \n",
       "L 207.118753 51.454589 \n",
       "L 209.809752 83.614484 \n",
       "L 212.177832 38.590631 \n",
       "L 214.261741 101.624026 \n",
       "L 216.095582 13.377273 \n",
       "L 217.709362 136.922727 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"m4fff15a461\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #ff7f0e\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#p0861631ede)\">\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"76.965625\" y=\"64.940681\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"95.274999\" y=\"64.733956\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"111.387249\" y=\"65.023371\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"125.566029\" y=\"64.618189\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"138.043355\" y=\"65.185444\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"149.023402\" y=\"64.391287\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"158.685844\" y=\"65.503107\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"167.188792\" y=\"63.94656\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"174.671387\" y=\"66.125726\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"181.25607\" y=\"63.074893\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"187.050591\" y=\"67.346059\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"192.14977\" y=\"61.366427\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"196.637047\" y=\"69.737912\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"200.585851\" y=\"58.017833\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"204.060799\" y=\"74.425943\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"207.118753\" y=\"51.454589\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"209.809752\" y=\"83.614484\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"212.177832\" y=\"38.590631\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"214.261741\" y=\"101.624026\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"216.095582\" y=\"13.377273\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m4fff15a461\" x=\"217.709362\" y=\"136.922727\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_1\">\n",
       "    <path d=\"M 229.543747 64.854545 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_2\">\n",
       "    <path d=\"M 257.007812 64.906563 \n",
       "L 253.956253 64.906709 \n",
       "L 250.904693 64.906838 \n",
       "L 247.853119 64.90695 \n",
       "L 244.80156 64.907045 \n",
       "L 241.75 64.907123 \n",
       "L 238.698441 64.907183 \n",
       "L 235.646881 64.907226 \n",
       "L 232.595307 64.907252 \n",
       "L 229.543747 64.90726 \n",
       "L 226.492188 64.907252 \n",
       "L 223.440628 64.907226 \n",
       "L 220.389069 64.907183 \n",
       "L 217.337495 64.907123 \n",
       "L 214.285935 64.907045 \n",
       "L 211.234376 64.90695 \n",
       "L 208.182816 64.906838 \n",
       "L 205.131257 64.906709 \n",
       "L 202.079682 64.906563 \n",
       "L 199.028123 64.906399 \n",
       "L 196.12183 64.906227 \n",
       "L 195.976563 64.906217 \n",
       "L 192.925004 64.906002 \n",
       "L 189.873444 64.905768 \n",
       "L 186.82187 64.905515 \n",
       "L 183.770311 64.905244 \n",
       "L 180.718751 64.904954 \n",
       "L 177.667184 64.904645 \n",
       "L 174.615625 64.904317 \n",
       "L 171.564065 64.90397 \n",
       "L 168.512498 64.903605 \n",
       "L 165.460939 64.903221 \n",
       "L 162.409372 64.902819 \n",
       "L 159.357813 64.902398 \n",
       "L 156.306253 64.901958 \n",
       "L 156.057149 64.90192 \n",
       "L 153.254686 64.901459 \n",
       "L 150.203127 64.900936 \n",
       "L 147.15156 64.900392 \n",
       "L 144.1 64.899828 \n",
       "L 141.048441 64.899244 \n",
       "L 137.996874 64.898639 \n",
       "L 134.945314 64.898013 \n",
       "L 133.056254 64.897613 \n",
       "L 131.893747 64.897341 \n",
       "L 128.842188 64.896605 \n",
       "L 125.790628 64.895845 \n",
       "L 122.739062 64.895063 \n",
       "L 119.687502 64.894259 \n",
       "L 116.635943 64.893431 \n",
       "L 116.188355 64.893306 \n",
       "L 113.584376 64.892496 \n",
       "L 110.532809 64.89152 \n",
       "L 107.481249 64.89052 \n",
       "L 104.42969 64.889494 \n",
       "L 102.995818 64.889 \n",
       "L 101.37813 64.888368 \n",
       "L 98.326556 64.887148 \n",
       "L 95.274997 64.885899 \n",
       "L 92.394877 64.884693 \n",
       "L 92.223437 64.88461 \n",
       "L 89.171878 64.883103 \n",
       "L 86.120318 64.881562 \n",
       "L 83.839663 64.880386 \n",
       "L 83.068744 64.879916 \n",
       "L 80.017184 64.878017 \n",
       "L 76.965625 64.876079 \n",
       "L 73.914065 64.873663 \n",
       "L 71.573533 64.871773 \n",
       "L 70.862506 64.871034 \n",
       "L 67.810932 64.867804 \n",
       "L 67.497229 64.867466 \n",
       "L 64.759372 64.863331 \n",
       "L 64.64739 64.863159 \n",
       "L 62.967633 64.858852 \n",
       "L 62.407714 64.854545 \n",
       "L 62.967633 64.850239 \n",
       "L 64.64739 64.845932 \n",
       "L 64.759372 64.84576 \n",
       "L 67.497229 64.841625 \n",
       "L 67.810932 64.841287 \n",
       "L 70.862506 64.838057 \n",
       "L 71.573547 64.837318 \n",
       "L 73.914065 64.835428 \n",
       "L 76.965625 64.833012 \n",
       "L 80.017184 64.831073 \n",
       "L 83.068744 64.829175 \n",
       "L 83.839679 64.828705 \n",
       "L 86.120318 64.827529 \n",
       "L 89.171878 64.825988 \n",
       "L 92.223437 64.824481 \n",
       "L 92.394877 64.824398 \n",
       "L 95.274997 64.823192 \n",
       "L 98.326556 64.821943 \n",
       "L 101.37813 64.820723 \n",
       "L 102.995818 64.820091 \n",
       "L 104.42969 64.819597 \n",
       "L 107.481249 64.818571 \n",
       "L 110.532809 64.81757 \n",
       "L 113.584376 64.816595 \n",
       "L 116.188393 64.815784 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_3\">\n",
       "    <path d=\"M 257.007812 64.928616 \n",
       "L 253.956253 64.928721 \n",
       "L 250.904693 64.928813 \n",
       "L 247.853119 64.928893 \n",
       "L 244.80156 64.92896 \n",
       "L 241.75 64.929016 \n",
       "L 238.698441 64.929059 \n",
       "L 235.646881 64.92909 \n",
       "L 232.595307 64.929108 \n",
       "L 229.543747 64.929114 \n",
       "L 226.492188 64.929108 \n",
       "L 223.440628 64.92909 \n",
       "L 220.389069 64.929059 \n",
       "L 217.337495 64.929016 \n",
       "L 214.285935 64.92896 \n",
       "L 211.234376 64.928893 \n",
       "L 208.182816 64.928813 \n",
       "L 205.131257 64.928721 \n",
       "L 202.079682 64.928616 \n",
       "L 199.028123 64.928499 \n",
       "L 195.976563 64.92837 \n",
       "L 192.925004 64.928228 \n",
       "L 189.873444 64.928075 \n",
       "L 186.82187 64.927908 \n",
       "L 184.296407 64.927761 \n",
       "L 183.770311 64.927728 \n",
       "L 180.718751 64.927526 \n",
       "L 177.667184 64.92731 \n",
       "L 174.615625 64.927082 \n",
       "L 171.564065 64.926841 \n",
       "L 168.512498 64.926586 \n",
       "L 165.460939 64.926319 \n",
       "L 162.409372 64.926038 \n",
       "L 159.357813 64.925744 \n",
       "L 156.306253 64.925438 \n",
       "L 153.254686 64.925118 \n",
       "L 150.203127 64.924785 \n",
       "L 147.15156 64.924439 \n",
       "L 144.1 64.92408 \n",
       "L 141.048441 64.923708 \n",
       "L 139.031327 64.923454 \n",
       "L 137.996874 64.923315 \n",
       "L 134.945314 64.922891 \n",
       "L 131.893747 64.922454 \n",
       "L 128.842188 64.922002 \n",
       "L 125.790628 64.921537 \n",
       "L 122.739062 64.921057 \n",
       "L 119.687502 64.920564 \n",
       "L 116.635943 64.920057 \n",
       "L 113.584376 64.919536 \n",
       "L 111.365054 64.919147 \n",
       "L 110.532809 64.918991 \n",
       "L 107.481249 64.918405 \n",
       "L 104.42969 64.917803 \n",
       "L 101.37813 64.917187 \n",
       "L 98.326556 64.916556 \n",
       "L 95.274997 64.91591 \n",
       "L 92.223437 64.915249 \n",
       "L 90.379079 64.91484 \n",
       "L 89.171878 64.914553 \n",
       "L 86.120318 64.913812 \n",
       "L 83.068744 64.913054 \n",
       "L 80.017184 64.91228 \n",
       "L 76.965625 64.911491 \n",
       "L 73.914065 64.910685 \n",
       "L 73.351141 64.910534 \n",
       "L 70.862506 64.90981 \n",
       "L 67.810932 64.908906 \n",
       "L 64.759372 64.907984 \n",
       "L 61.707813 64.907045 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_4\">\n",
       "    <path d=\"M 257.007812 64.945484 \n",
       "L 253.956253 64.945569 \n",
       "L 250.904693 64.945644 \n",
       "L 247.853119 64.945709 \n",
       "L 244.80156 64.945764 \n",
       "L 241.75 64.945809 \n",
       "L 238.698441 64.945844 \n",
       "L 235.646881 64.945869 \n",
       "L 232.595307 64.945884 \n",
       "L 229.543747 64.945889 \n",
       "L 226.492188 64.945884 \n",
       "L 223.440628 64.945869 \n",
       "L 220.389069 64.945844 \n",
       "L 217.337495 64.945809 \n",
       "L 214.285935 64.945764 \n",
       "L 211.234376 64.945709 \n",
       "L 208.182816 64.945644 \n",
       "L 205.131257 64.945569 \n",
       "L 202.079682 64.945484 \n",
       "L 199.028123 64.945389 \n",
       "L 195.976563 64.945283 \n",
       "L 192.925004 64.945168 \n",
       "L 189.873444 64.945043 \n",
       "L 188.630051 64.944988 \n",
       "L 186.82187 64.944904 \n",
       "L 183.770311 64.944752 \n",
       "L 180.718751 64.944589 \n",
       "L 177.667184 64.944415 \n",
       "L 174.615625 64.944232 \n",
       "L 171.564065 64.944037 \n",
       "L 168.512498 64.943832 \n",
       "L 165.460939 64.943617 \n",
       "L 162.409372 64.943391 \n",
       "L 159.357813 64.943155 \n",
       "L 156.306253 64.942908 \n",
       "L 153.254686 64.942651 \n",
       "L 150.203127 64.942383 \n",
       "L 147.15156 64.942104 \n",
       "L 144.1 64.941816 \n",
       "L 141.048441 64.941516 \n",
       "L 137.996874 64.941206 \n",
       "L 134.945314 64.940886 \n",
       "L 133.056262 64.940681 \n",
       "L 131.893747 64.940549 \n",
       "L 128.842188 64.94019 \n",
       "L 125.790628 64.93982 \n",
       "L 122.739062 64.939439 \n",
       "L 119.687502 64.939047 \n",
       "L 116.635943 64.938644 \n",
       "L 113.584376 64.93823 \n",
       "L 110.532809 64.937804 \n",
       "L 107.481249 64.937368 \n",
       "L 104.42969 64.936921 \n",
       "L 101.37813 64.936463 \n",
       "L 100.803696 64.936374 \n",
       "L 98.326556 64.935973 \n",
       "L 95.274997 64.935466 \n",
       "L 92.223437 64.934948 \n",
       "L 89.171878 64.934419 \n",
       "L 86.120318 64.933878 \n",
       "L 83.068744 64.933325 \n",
       "L 80.017184 64.93276 \n",
       "L 76.965625 64.932184 \n",
       "L 76.361341 64.932068 \n",
       "L 73.914065 64.931569 \n",
       "L 70.862506 64.930935 \n",
       "L 67.810932 64.930289 \n",
       "L 64.759372 64.929631 \n",
       "L 61.707813 64.92896 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_5\">\n",
       "    <path d=\"M 257.007812 64.959662 \n",
       "L 253.956253 64.959736 \n",
       "L 250.904693 64.959802 \n",
       "L 247.853119 64.959859 \n",
       "L 244.80156 64.959908 \n",
       "L 241.75 64.959947 \n",
       "L 238.698441 64.959978 \n",
       "L 235.646881 64.96 \n",
       "L 232.595307 64.960013 \n",
       "L 229.543747 64.960018 \n",
       "L 226.492188 64.960013 \n",
       "L 223.440628 64.96 \n",
       "L 220.389069 64.959978 \n",
       "L 217.337495 64.959947 \n",
       "L 214.285935 64.959908 \n",
       "L 211.234376 64.959859 \n",
       "L 208.182816 64.959802 \n",
       "L 205.131257 64.959736 \n",
       "L 202.079682 64.959662 \n",
       "L 199.028123 64.959578 \n",
       "L 195.976563 64.959486 \n",
       "L 192.925004 64.959385 \n",
       "L 189.873444 64.959275 \n",
       "L 186.82187 64.959156 \n",
       "L 183.770311 64.959029 \n",
       "L 180.718751 64.958893 \n",
       "L 177.667184 64.958748 \n",
       "L 174.615625 64.958594 \n",
       "L 171.564065 64.958431 \n",
       "L 168.512498 64.95826 \n",
       "L 165.460939 64.95808 \n",
       "L 162.693284 64.957908 \n",
       "L 162.409372 64.95789 \n",
       "L 159.357813 64.957684 \n",
       "L 156.306253 64.957468 \n",
       "L 153.254686 64.957244 \n",
       "L 150.203127 64.95701 \n",
       "L 147.15156 64.956767 \n",
       "L 144.1 64.956515 \n",
       "L 141.048441 64.956254 \n",
       "L 137.996874 64.955984 \n",
       "L 134.945314 64.955704 \n",
       "L 131.893747 64.955416 \n",
       "L 128.842188 64.955118 \n",
       "L 125.790628 64.954811 \n",
       "L 122.739062 64.954495 \n",
       "L 119.687502 64.95417 \n",
       "L 116.635943 64.953835 \n",
       "L 114.560874 64.953601 \n",
       "L 113.584376 64.953487 \n",
       "L 110.532809 64.953118 \n",
       "L 107.481249 64.95274 \n",
       "L 104.42969 64.952352 \n",
       "L 101.37813 64.951955 \n",
       "L 98.326556 64.951549 \n",
       "L 95.274997 64.951132 \n",
       "L 92.223437 64.950706 \n",
       "L 89.171878 64.950271 \n",
       "L 86.120318 64.949826 \n",
       "L 83.068744 64.949371 \n",
       "L 82.565401 64.949295 \n",
       "L 80.017184 64.948889 \n",
       "L 76.965625 64.948393 \n",
       "L 73.914065 64.947887 \n",
       "L 70.862506 64.947372 \n",
       "L 67.810932 64.946846 \n",
       "L 64.759372 64.94631 \n",
       "L 61.707813 64.945764 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_6\">\n",
       "    <path d=\"M 257.007812 64.972156 \n",
       "L 253.956253 64.972222 \n",
       "L 250.904693 64.972281 \n",
       "L 247.853119 64.972332 \n",
       "L 244.80156 64.972375 \n",
       "L 241.75 64.97241 \n",
       "L 238.698441 64.972438 \n",
       "L 235.646881 64.972457 \n",
       "L 232.595307 64.972469 \n",
       "L 229.543747 64.972473 \n",
       "L 226.492188 64.972469 \n",
       "L 223.440628 64.972457 \n",
       "L 220.389069 64.972438 \n",
       "L 217.337495 64.97241 \n",
       "L 214.285935 64.972375 \n",
       "L 211.234376 64.972332 \n",
       "L 208.182816 64.972281 \n",
       "L 205.131257 64.972222 \n",
       "L 202.079682 64.972156 \n",
       "L 199.028123 64.972081 \n",
       "L 195.976563 64.971999 \n",
       "L 192.925004 64.971909 \n",
       "L 189.873444 64.971811 \n",
       "L 186.82187 64.971706 \n",
       "L 183.770311 64.971592 \n",
       "L 180.718751 64.971471 \n",
       "L 177.667184 64.971341 \n",
       "L 174.615625 64.971204 \n",
       "L 171.564065 64.97106 \n",
       "L 168.512498 64.970907 \n",
       "L 167.023983 64.970829 \n",
       "L 165.460939 64.970743 \n",
       "L 162.409372 64.970569 \n",
       "L 159.357813 64.970386 \n",
       "L 156.306253 64.970195 \n",
       "L 153.254686 64.969996 \n",
       "L 150.203127 64.969788 \n",
       "L 147.15156 64.969573 \n",
       "L 144.1 64.96935 \n",
       "L 141.048441 64.969118 \n",
       "L 137.996874 64.968878 \n",
       "L 134.945314 64.96863 \n",
       "L 131.893747 64.968375 \n",
       "L 128.842188 64.96811 \n",
       "L 125.790628 64.967838 \n",
       "L 122.739062 64.967558 \n",
       "L 119.687502 64.967269 \n",
       "L 116.635943 64.966973 \n",
       "L 113.584376 64.966668 \n",
       "L 112.157615 64.966522 \n",
       "L 110.532809 64.966349 \n",
       "L 107.481249 64.966015 \n",
       "L 104.42969 64.965673 \n",
       "L 101.37813 64.965323 \n",
       "L 98.326556 64.964964 \n",
       "L 95.274997 64.964596 \n",
       "L 92.223437 64.964221 \n",
       "L 89.171878 64.963836 \n",
       "L 86.120318 64.963444 \n",
       "L 83.068744 64.963043 \n",
       "L 80.017184 64.962633 \n",
       "L 76.965625 64.962215 \n",
       "L 73.914065 64.961771 \n",
       "L 70.862506 64.961318 \n",
       "L 67.810932 64.960857 \n",
       "L 64.759372 64.960387 \n",
       "L 61.707813 64.959908 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_7\">\n",
       "    <path d=\"M 229.543747 64.983749 \n",
       "L 226.492188 64.983745 \n",
       "L 223.440628 64.983734 \n",
       "L 220.389069 64.983716 \n",
       "L 217.337495 64.983691 \n",
       "L 214.285935 64.983658 \n",
       "L 211.234376 64.983618 \n",
       "L 208.182816 64.98357 \n",
       "L 205.131257 64.983515 \n",
       "L 202.079682 64.983453 \n",
       "L 199.028123 64.983384 \n",
       "L 195.976563 64.983307 \n",
       "L 192.925004 64.983223 \n",
       "L 189.873444 64.983132 \n",
       "L 186.82187 64.983034 \n",
       "L 183.770311 64.982928 \n",
       "L 180.718751 64.982815 \n",
       "L 177.667184 64.982694 \n",
       "L 174.615625 64.982566 \n",
       "L 171.564065 64.982431 \n",
       "L 168.512498 64.982289 \n",
       "L 165.460939 64.982139 \n",
       "L 162.409372 64.981982 \n",
       "L 159.357813 64.981818 \n",
       "L 156.306253 64.981647 \n",
       "L 153.254686 64.981468 \n",
       "L 150.203127 64.981282 \n",
       "L 147.15156 64.981088 \n",
       "L 144.1 64.980887 \n",
       "L 141.048441 64.980679 \n",
       "L 137.996874 64.980464 \n",
       "L 134.945314 64.980241 \n",
       "L 131.893747 64.980011 \n",
       "L 128.842188 64.979774 \n",
       "L 125.790628 64.97953 \n",
       "L 124.729295 64.979442 \n",
       "L 122.739062 64.979272 \n",
       "L 119.687502 64.979004 \n",
       "L 116.635943 64.978728 \n",
       "L 113.584376 64.978445 \n",
       "L 110.532809 64.978154 \n",
       "L 107.481249 64.977855 \n",
       "L 104.42969 64.977549 \n",
       "L 101.37813 64.977236 \n",
       "L 98.326556 64.976915 \n",
       "L 95.274997 64.976586 \n",
       "L 92.223437 64.97625 \n",
       "L 89.171878 64.975906 \n",
       "L 86.120318 64.975555 \n",
       "L 83.068744 64.975196 \n",
       "L 82.565371 64.975135 \n",
       "L 80.017184 64.974818 \n",
       "L 76.965625 64.974431 \n",
       "L 73.914065 64.974035 \n",
       "L 70.862506 64.973632 \n",
       "L 67.810932 64.973221 \n",
       "L 64.759372 64.972802 \n",
       "L 61.707813 64.972375 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "    <path d=\"M 257.007812 64.983453 \n",
       "L 253.956253 64.983515 \n",
       "L 250.904693 64.98357 \n",
       "L 247.853119 64.983618 \n",
       "L 244.80156 64.983658 \n",
       "L 241.75 64.983691 \n",
       "L 238.698441 64.983716 \n",
       "L 235.646881 64.983734 \n",
       "L 232.595307 64.983745 \n",
       "L 229.543747 64.983749 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_8\">\n",
       "    <path d=\"M 62.407706 64.983749 \n",
       "L 61.707813 64.983658 \n",
       "\" clip-path=\"url(#p0861631ede)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_9\"/>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 61.707813 143.1 \n",
       "L 61.707813 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 257.007812 143.1 \n",
       "L 257.007812 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 61.707813 143.1 \n",
       "L 257.007812 143.1 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 61.707813 7.2 \n",
       "L 257.007812 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p0861631ede\">\n",
       "   <rect x=\"61.707813\" y=\"7.2\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "eta = 0.6\n",
    "d2l.show_trace_2d(f_2d, d2l.train_2d(gd_2d))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "29a46c21",
   "metadata": {},
   "source": [
    "#### 11.6.1.3. 动量法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e6033cf1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch 20, x1: 0.007188, x2: 0.002553\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"245.120313pt\" height=\"180.65625pt\" viewBox=\"0 0 245.120313 180.65625\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:05:40.007696</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 180.65625 \n",
       "L 245.120313 180.65625 \n",
       "L 245.120313 0 \n",
       "L 0 0 \n",
       "L 0 180.65625 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 237.920313 143.1 \n",
       "L 237.920313 7.2 \n",
       "L 42.620312 7.2 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"m3031f6c5d1\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m3031f6c5d1\" x=\"88.393749\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- −4 -->\n",
       "      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m3031f6c5d1\" x=\"149.424998\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- −2 -->\n",
       "      <g transform=\"translate(142.053905 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m3031f6c5d1\" x=\"210.456247\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(207.274997 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_4\">\n",
       "     <!-- x1 -->\n",
       "     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
       "L 2247 1797 \n",
       "L 3578 0 \n",
       "L 2900 0 \n",
       "L 1881 1375 \n",
       "L 863 0 \n",
       "L 184 0 \n",
       "L 1544 1831 \n",
       "L 300 3500 \n",
       "L 978 3500 \n",
       "L 1906 2253 \n",
       "L 2834 3500 \n",
       "L 3513 3500 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <defs>\n",
       "       <path id=\"m9042e63fd1\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9042e63fd1\" x=\"42.620312\" y=\"120.784729\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- −2 -->\n",
       "      <g transform=\"translate(20.878125 124.583948)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9042e63fd1\" x=\"42.620312\" y=\"76.154187\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(29.257812 79.953406)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9042e63fd1\" x=\"42.620312\" y=\"31.523645\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 2 -->\n",
       "      <g transform=\"translate(29.257812 35.322864)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_8\">\n",
       "     <!-- x2 -->\n",
       "     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-32\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_7\">\n",
       "    <path d=\"M 57.878125 120.784729 \n",
       "L 76.187499 13.671429 \n",
       "L 101.454437 110.073399 \n",
       "L 127.168122 76.868276 \n",
       "L 150.01954 58.551901 \n",
       "L 168.697654 91.6392 \n",
       "L 183.047742 71.018819 \n",
       "L 193.511807 73.033513 \n",
       "L 200.777172 81.530479 \n",
       "L 205.571344 72.875862 \n",
       "L 208.554618 76.416534 \n",
       "L 210.274451 77.557238 \n",
       "L 211.156183 74.760268 \n",
       "L 211.513056 76.707189 \n",
       "L 211.564676 76.353445 \n",
       "L 211.457475 75.698354 \n",
       "L 211.283727 76.464808 \n",
       "L 211.097555 76.102545 \n",
       "L 210.927512 76.045355 \n",
       "L 210.785939 76.277957 \n",
       "L 210.67559 76.09721 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"m85ba97f5d6\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #ff7f0e\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#pbeb73c1486)\">\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"57.878125\" y=\"120.784729\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"76.187499\" y=\"13.671429\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"101.454437\" y=\"110.073399\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"127.168122\" y=\"76.868276\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"150.01954\" y=\"58.551901\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"168.697654\" y=\"91.6392\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"183.047742\" y=\"71.018819\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"193.511807\" y=\"73.033513\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"200.777172\" y=\"81.530479\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"205.571344\" y=\"72.875862\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"208.554618\" y=\"76.416534\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"210.274451\" y=\"77.557238\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"211.156183\" y=\"74.760268\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"211.513056\" y=\"76.707189\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"211.564676\" y=\"76.353445\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"211.457475\" y=\"75.698354\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"211.283727\" y=\"76.464808\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"211.097555\" y=\"76.102545\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"210.927512\" y=\"76.045355\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"210.785939\" y=\"76.277957\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m85ba97f5d6\" x=\"210.67559\" y=\"76.09721\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_1\">\n",
       "    <path d=\"M 210.456247 76.154187 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_2\">\n",
       "    <path d=\"M 237.920312 103.106571 \n",
       "L 234.868753 103.182443 \n",
       "L 231.817193 103.249389 \n",
       "L 228.765619 103.307409 \n",
       "L 225.71406 103.356502 \n",
       "L 222.6625 103.39667 \n",
       "L 219.610941 103.427911 \n",
       "L 216.559381 103.450227 \n",
       "L 213.507807 103.463616 \n",
       "L 210.456247 103.468079 \n",
       "L 207.404688 103.463616 \n",
       "L 204.353128 103.450227 \n",
       "L 201.301569 103.427911 \n",
       "L 198.249995 103.39667 \n",
       "L 195.198435 103.356502 \n",
       "L 192.146876 103.307409 \n",
       "L 189.095316 103.249389 \n",
       "L 186.043757 103.182444 \n",
       "L 182.992182 103.106571 \n",
       "L 179.940623 103.021774 \n",
       "L 177.03433 102.932511 \n",
       "L 176.889063 102.927661 \n",
       "L 173.837504 102.816085 \n",
       "L 170.785944 102.694807 \n",
       "L 167.73437 102.563825 \n",
       "L 164.682811 102.423143 \n",
       "L 161.631251 102.272756 \n",
       "L 158.579684 102.112669 \n",
       "L 155.528125 101.942879 \n",
       "L 152.476565 101.763386 \n",
       "L 149.424998 101.574191 \n",
       "L 146.373439 101.375295 \n",
       "L 143.321872 101.166696 \n",
       "L 140.270312 100.948394 \n",
       "L 137.218753 100.72039 \n",
       "L 136.969649 100.700986 \n",
       "L 134.167186 100.461893 \n",
       "L 131.115627 100.190923 \n",
       "L 128.06406 99.909324 \n",
       "L 125.0125 99.617101 \n",
       "L 121.960941 99.314251 \n",
       "L 118.909374 99.000774 \n",
       "L 115.857814 98.676672 \n",
       "L 113.968754 98.469458 \n",
       "L 112.806247 98.328519 \n",
       "L 109.754688 97.946811 \n",
       "L 106.703128 97.553357 \n",
       "L 103.651562 97.148159 \n",
       "L 100.600002 96.731216 \n",
       "L 97.548443 96.302528 \n",
       "L 97.100855 96.237928 \n",
       "L 94.496876 95.817878 \n",
       "L 91.445309 95.312502 \n",
       "L 88.393749 94.794001 \n",
       "L 85.34219 94.262372 \n",
       "L 83.908318 94.006403 \n",
       "L 82.29063 93.679115 \n",
       "L 79.239056 93.046845 \n",
       "L 76.187497 92.399703 \n",
       "L 73.307377 91.774878 \n",
       "L 73.135937 91.731963 \n",
       "L 70.084378 90.950928 \n",
       "L 67.032818 90.152729 \n",
       "L 64.752163 89.543348 \n",
       "L 63.981244 89.299909 \n",
       "L 60.929684 88.31601 \n",
       "L 57.878125 87.311823 \n",
       "L 54.826565 86.05969 \n",
       "L 52.486033 85.080292 \n",
       "L 51.775006 84.697753 \n",
       "L 48.723432 83.024097 \n",
       "L 48.409729 82.848767 \n",
       "L 45.671872 80.706502 \n",
       "L 45.55989 80.617242 \n",
       "L 43.880133 78.385712 \n",
       "L 43.320214 76.154187 \n",
       "L 43.880133 73.922657 \n",
       "L 45.55989 71.691132 \n",
       "L 45.671872 71.601872 \n",
       "L 48.409729 69.459607 \n",
       "L 48.723432 69.284278 \n",
       "L 51.775006 67.610623 \n",
       "L 52.486047 67.228077 \n",
       "L 54.826565 66.248684 \n",
       "L 57.878125 64.996552 \n",
       "L 60.929684 63.992365 \n",
       "L 63.981244 63.008465 \n",
       "L 64.752179 62.765021 \n",
       "L 67.032818 62.155645 \n",
       "L 70.084378 61.357446 \n",
       "L 73.135937 60.576411 \n",
       "L 73.307377 60.533496 \n",
       "L 76.187497 59.908672 \n",
       "L 79.239056 59.26153 \n",
       "L 82.29063 58.62926 \n",
       "L 83.908318 58.301972 \n",
       "L 85.34219 58.046002 \n",
       "L 88.393749 57.514373 \n",
       "L 91.445309 56.995872 \n",
       "L 94.496876 56.490496 \n",
       "L 97.100893 56.070441 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_3\">\n",
       "    <path d=\"M 237.920312 114.533265 \n",
       "L 234.868753 114.587459 \n",
       "L 231.817193 114.635277 \n",
       "L 228.765619 114.676721 \n",
       "L 225.71406 114.711787 \n",
       "L 222.6625 114.740479 \n",
       "L 219.610941 114.762794 \n",
       "L 216.559381 114.778732 \n",
       "L 213.507807 114.788297 \n",
       "L 210.456247 114.791484 \n",
       "L 207.404688 114.788297 \n",
       "L 204.353128 114.778732 \n",
       "L 201.301569 114.762794 \n",
       "L 198.249995 114.740479 \n",
       "L 195.198435 114.711787 \n",
       "L 192.146876 114.676721 \n",
       "L 189.095316 114.635278 \n",
       "L 186.043757 114.587459 \n",
       "L 182.992182 114.533265 \n",
       "L 179.940623 114.472695 \n",
       "L 176.889063 114.405749 \n",
       "L 173.837504 114.332427 \n",
       "L 170.785944 114.252729 \n",
       "L 167.73437 114.166656 \n",
       "L 165.208907 114.090146 \n",
       "L 164.682811 114.073242 \n",
       "L 161.631251 113.968427 \n",
       "L 158.579684 113.856851 \n",
       "L 155.528125 113.738513 \n",
       "L 152.476565 113.613412 \n",
       "L 149.424998 113.481548 \n",
       "L 146.373439 113.342924 \n",
       "L 143.321872 113.197536 \n",
       "L 140.270312 113.045387 \n",
       "L 137.218753 112.886476 \n",
       "L 134.167186 112.720801 \n",
       "L 131.115627 112.548364 \n",
       "L 128.06406 112.369166 \n",
       "L 125.0125 112.183206 \n",
       "L 121.960941 111.990483 \n",
       "L 119.943827 111.858621 \n",
       "L 118.909374 111.786635 \n",
       "L 115.857814 111.567082 \n",
       "L 112.806247 111.340329 \n",
       "L 109.754688 111.106379 \n",
       "L 106.703128 110.86523 \n",
       "L 103.651562 110.616884 \n",
       "L 100.600002 110.361338 \n",
       "L 97.548443 110.098594 \n",
       "L 94.496876 109.82865 \n",
       "L 92.277554 109.627094 \n",
       "L 91.445309 109.546297 \n",
       "L 88.393749 109.242348 \n",
       "L 85.34219 108.930704 \n",
       "L 82.29063 108.611365 \n",
       "L 79.239056 108.284329 \n",
       "L 76.187497 107.949601 \n",
       "L 73.135937 107.607177 \n",
       "L 71.291579 107.395566 \n",
       "L 70.084378 107.246799 \n",
       "L 67.032818 106.86248 \n",
       "L 63.981244 106.469895 \n",
       "L 60.929684 106.069047 \n",
       "L 57.878125 105.659934 \n",
       "L 54.826565 105.242557 \n",
       "L 54.263641 105.164038 \n",
       "L 51.775006 104.789143 \n",
       "L 48.723432 104.32052 \n",
       "L 45.671872 103.842976 \n",
       "L 42.620312 103.356502 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_4\">\n",
       "    <path d=\"M 237.920312 123.273141 \n",
       "L 234.868753 123.317254 \n",
       "L 231.817193 123.356176 \n",
       "L 228.765619 123.389908 \n",
       "L 225.71406 123.418452 \n",
       "L 222.6625 123.441805 \n",
       "L 219.610941 123.459968 \n",
       "L 216.559381 123.472942 \n",
       "L 213.507807 123.480725 \n",
       "L 210.456247 123.483321 \n",
       "L 207.404688 123.480725 \n",
       "L 204.353128 123.472942 \n",
       "L 201.301569 123.459968 \n",
       "L 198.249995 123.441805 \n",
       "L 195.198435 123.418452 \n",
       "L 192.146876 123.389908 \n",
       "L 189.095316 123.356176 \n",
       "L 186.043757 123.317254 \n",
       "L 182.992182 123.273141 \n",
       "L 179.940623 123.22384 \n",
       "L 176.889063 123.16935 \n",
       "L 173.837504 123.10967 \n",
       "L 170.785944 123.044801 \n",
       "L 169.542551 123.016254 \n",
       "L 167.73437 122.972715 \n",
       "L 164.682811 122.893794 \n",
       "L 161.631251 122.809434 \n",
       "L 158.579684 122.719629 \n",
       "L 155.528125 122.624378 \n",
       "L 152.476565 122.523688 \n",
       "L 149.424998 122.417556 \n",
       "L 146.373439 122.305978 \n",
       "L 143.321872 122.188959 \n",
       "L 140.270312 122.066496 \n",
       "L 137.218753 121.938592 \n",
       "L 134.167186 121.805245 \n",
       "L 131.115627 121.666456 \n",
       "L 128.06406 121.522222 \n",
       "L 125.0125 121.372545 \n",
       "L 121.960941 121.217429 \n",
       "L 118.909374 121.056868 \n",
       "L 115.857814 120.890862 \n",
       "L 113.968762 120.784729 \n",
       "L 112.806247 120.716066 \n",
       "L 109.754688 120.530107 \n",
       "L 106.703128 120.338424 \n",
       "L 103.651562 120.141019 \n",
       "L 100.600002 119.937894 \n",
       "L 97.548443 119.729046 \n",
       "L 94.496876 119.514475 \n",
       "L 91.445309 119.294183 \n",
       "L 88.393749 119.06817 \n",
       "L 85.34219 118.836434 \n",
       "L 82.29063 118.598978 \n",
       "L 81.716196 118.553201 \n",
       "L 79.239056 118.345126 \n",
       "L 76.187497 118.082771 \n",
       "L 73.135937 117.814386 \n",
       "L 70.084378 117.539969 \n",
       "L 67.032818 117.25952 \n",
       "L 63.981244 116.97304 \n",
       "L 60.929684 116.680529 \n",
       "L 57.878125 116.381987 \n",
       "L 57.273841 116.321674 \n",
       "L 54.826565 116.063456 \n",
       "L 51.775006 115.735104 \n",
       "L 48.723432 115.400373 \n",
       "L 45.671872 115.059267 \n",
       "L 42.620312 114.711786 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_5\">\n",
       "    <path d=\"M 237.920312 130.619388 \n",
       "L 234.868753 130.658098 \n",
       "L 231.817193 130.692255 \n",
       "L 228.765619 130.721856 \n",
       "L 225.71406 130.746905 \n",
       "L 222.6625 130.767398 \n",
       "L 219.610941 130.783338 \n",
       "L 216.559381 130.794723 \n",
       "L 213.507807 130.801553 \n",
       "L 210.456247 130.803831 \n",
       "L 207.404688 130.801553 \n",
       "L 204.353128 130.794723 \n",
       "L 201.301569 130.783338 \n",
       "L 198.249995 130.767398 \n",
       "L 195.198435 130.746905 \n",
       "L 192.146876 130.721856 \n",
       "L 189.095316 130.692255 \n",
       "L 186.043757 130.658098 \n",
       "L 182.992182 130.619388 \n",
       "L 179.940623 130.576123 \n",
       "L 176.889063 130.528305 \n",
       "L 173.837504 130.475933 \n",
       "L 170.785944 130.419007 \n",
       "L 167.73437 130.357525 \n",
       "L 164.682811 130.29149 \n",
       "L 161.631251 130.220903 \n",
       "L 158.579684 130.145759 \n",
       "L 155.528125 130.06606 \n",
       "L 152.476565 129.981809 \n",
       "L 149.424998 129.893005 \n",
       "L 146.373439 129.799644 \n",
       "L 143.605784 129.71084 \n",
       "L 143.321872 129.701342 \n",
       "L 140.270312 129.594513 \n",
       "L 137.218753 129.482937 \n",
       "L 134.167186 129.366613 \n",
       "L 131.115627 129.245542 \n",
       "L 128.06406 129.11972 \n",
       "L 125.0125 128.989152 \n",
       "L 121.960941 128.853837 \n",
       "L 118.909374 128.713773 \n",
       "L 115.857814 128.568959 \n",
       "L 112.806247 128.4194 \n",
       "L 109.754688 128.265093 \n",
       "L 106.703128 128.106036 \n",
       "L 103.651562 127.942232 \n",
       "L 100.600002 127.773682 \n",
       "L 97.548443 127.600383 \n",
       "L 95.473374 127.479309 \n",
       "L 94.496876 127.419802 \n",
       "L 91.445309 127.228883 \n",
       "L 88.393749 127.033003 \n",
       "L 85.34219 126.832168 \n",
       "L 82.29063 126.626371 \n",
       "L 79.239056 126.415616 \n",
       "L 76.187497 126.199902 \n",
       "L 73.135937 125.979229 \n",
       "L 70.084378 125.753596 \n",
       "L 67.032818 125.523006 \n",
       "L 63.981244 125.287455 \n",
       "L 63.477901 125.247784 \n",
       "L 60.929684 125.037605 \n",
       "L 57.878125 124.78072 \n",
       "L 54.826565 124.518646 \n",
       "L 51.775006 124.251382 \n",
       "L 48.723432 123.978927 \n",
       "L 45.671872 123.701283 \n",
       "L 42.620312 123.41845 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_6\">\n",
       "    <path d=\"M 237.920312 137.093134 \n",
       "L 234.868753 137.127621 \n",
       "L 231.817193 137.158052 \n",
       "L 228.765619 137.184424 \n",
       "L 225.71406 137.20674 \n",
       "L 222.6625 137.224998 \n",
       "L 219.610941 137.239198 \n",
       "L 216.559381 137.249342 \n",
       "L 213.507807 137.255427 \n",
       "L 210.456247 137.257456 \n",
       "L 207.404688 137.255427 \n",
       "L 204.353128 137.249342 \n",
       "L 201.301569 137.239198 \n",
       "L 198.249995 137.224998 \n",
       "L 195.198435 137.20674 \n",
       "L 192.146876 137.184424 \n",
       "L 189.095316 137.158052 \n",
       "L 186.043757 137.127621 \n",
       "L 182.992182 137.093134 \n",
       "L 179.940623 137.054589 \n",
       "L 176.889063 137.011987 \n",
       "L 173.837504 136.965329 \n",
       "L 170.785944 136.914613 \n",
       "L 167.73437 136.859838 \n",
       "L 164.682811 136.801006 \n",
       "L 161.631251 136.738119 \n",
       "L 158.579684 136.671174 \n",
       "L 155.528125 136.600169 \n",
       "L 152.476565 136.525109 \n",
       "L 149.424998 136.445992 \n",
       "L 147.936483 136.40542 \n",
       "L 146.373439 136.361209 \n",
       "L 143.321872 136.270684 \n",
       "L 140.270312 136.175949 \n",
       "L 137.218753 136.077004 \n",
       "L 134.167186 135.973849 \n",
       "L 131.115627 135.866484 \n",
       "L 128.06406 135.754907 \n",
       "L 125.0125 135.63912 \n",
       "L 121.960941 135.519124 \n",
       "L 118.909374 135.394917 \n",
       "L 115.857814 135.266498 \n",
       "L 112.806247 135.133869 \n",
       "L 109.754688 134.997031 \n",
       "L 106.703128 134.855981 \n",
       "L 103.651562 134.710721 \n",
       "L 100.600002 134.561253 \n",
       "L 97.548443 134.407572 \n",
       "L 94.496876 134.24968 \n",
       "L 93.070115 134.173889 \n",
       "L 91.445309 134.084194 \n",
       "L 88.393749 133.911359 \n",
       "L 85.34219 133.734151 \n",
       "L 82.29063 133.552565 \n",
       "L 79.239056 133.366605 \n",
       "L 76.187497 133.176269 \n",
       "L 73.135937 132.981557 \n",
       "L 70.084378 132.782469 \n",
       "L 67.032818 132.579007 \n",
       "L 63.981244 132.371168 \n",
       "L 60.929684 132.158954 \n",
       "L 57.878125 131.942365 \n",
       "L 54.826565 131.712381 \n",
       "L 51.775006 131.477844 \n",
       "L 48.723432 131.238751 \n",
       "L 45.671872 130.995104 \n",
       "L 42.620312 130.746905 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_7\">\n",
       "    <path d=\"M 210.456247 143.1 \n",
       "L 207.404688 143.09811 \n",
       "L 204.353128 143.092436 \n",
       "L 201.301569 143.082978 \n",
       "L 198.249995 143.069741 \n",
       "L 195.198435 143.052723 \n",
       "L 192.146876 143.031921 \n",
       "L 189.095316 143.007335 \n",
       "L 186.043757 142.97897 \n",
       "L 182.992182 142.94682 \n",
       "L 179.940623 142.910887 \n",
       "L 176.889063 142.871173 \n",
       "L 173.837504 142.82768 \n",
       "L 170.785944 142.780399 \n",
       "L 167.73437 142.729341 \n",
       "L 164.682811 142.674496 \n",
       "L 161.631251 142.615871 \n",
       "L 158.579684 142.553466 \n",
       "L 155.528125 142.487276 \n",
       "L 152.476565 142.417304 \n",
       "L 149.424998 142.343551 \n",
       "L 146.373439 142.266014 \n",
       "L 143.321872 142.184697 \n",
       "L 140.270312 142.099596 \n",
       "L 137.218753 142.010711 \n",
       "L 134.167186 141.918047 \n",
       "L 131.115627 141.821598 \n",
       "L 128.06406 141.721369 \n",
       "L 125.0125 141.617357 \n",
       "L 121.960941 141.509564 \n",
       "L 118.909374 141.397988 \n",
       "L 115.857814 141.282628 \n",
       "L 112.806247 141.163487 \n",
       "L 109.754688 141.040563 \n",
       "L 106.703128 140.913859 \n",
       "L 105.641795 140.868475 \n",
       "L 103.651562 140.780385 \n",
       "L 100.600002 140.641405 \n",
       "L 97.548443 140.498509 \n",
       "L 94.496876 140.351697 \n",
       "L 91.445309 140.200971 \n",
       "L 88.393749 140.046331 \n",
       "L 85.34219 139.887775 \n",
       "L 82.29063 139.725305 \n",
       "L 79.239056 139.558918 \n",
       "L 76.187497 139.388618 \n",
       "L 73.135937 139.214402 \n",
       "L 70.084378 139.036272 \n",
       "L 67.032818 138.854225 \n",
       "L 63.981244 138.668266 \n",
       "L 63.477871 138.636945 \n",
       "L 60.929684 138.472624 \n",
       "L 57.878125 138.271785 \n",
       "L 54.826565 138.066894 \n",
       "L 51.775006 137.857941 \n",
       "L 48.723432 137.644928 \n",
       "L 45.671872 137.427865 \n",
       "L 42.620312 137.206738 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "    <path d=\"M 237.920312 142.94682 \n",
       "L 234.868753 142.97897 \n",
       "L 231.817193 143.007335 \n",
       "L 228.765619 143.031921 \n",
       "L 225.71406 143.052723 \n",
       "L 222.6625 143.069741 \n",
       "L 219.610941 143.082978 \n",
       "L 216.559381 143.092436 \n",
       "L 213.507807 143.09811 \n",
       "L 210.456247 143.1 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_8\">\n",
       "    <path d=\"M 43.320206 143.1 \n",
       "L 42.620312 143.052723 \n",
       "\" clip-path=\"url(#pbeb73c1486)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_9\"/>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 42.620312 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 237.920313 143.1 \n",
       "L 237.920313 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 237.920312 143.1 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 42.620312 7.2 \n",
       "L 237.920312 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pbeb73c1486\">\n",
       "   <rect x=\"42.620312\" y=\"7.2\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "def momentum_2d(x1, x2, v1, v2):\n",
    "    v1 = beta * v1 + 0.2 * x1\n",
    "    v2 = beta * v2 + 4 * x2\n",
    "    return x1 - eta * v1, x2 - eta * v2, v1, v2\n",
    "\n",
    "eta, beta = 0.6, 0.5\n",
    "d2l.show_trace_2d(f_2d, d2l.train_2d(momentum_2d))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "363269c8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "epoch 20, x1: -0.126340, x2: -0.186632\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"245.120313pt\" height=\"180.65625pt\" viewBox=\"0 0 245.120313 180.65625\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:06:07.258690</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 180.65625 \n",
       "L 245.120313 180.65625 \n",
       "L 245.120313 0 \n",
       "L 0 0 \n",
       "L 0 180.65625 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 237.920313 143.1 \n",
       "L 237.920313 7.2 \n",
       "L 42.620312 7.2 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"m411df9aa61\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m411df9aa61\" x=\"88.393749\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- −4 -->\n",
       "      <g transform=\"translate(81.022656 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m411df9aa61\" x=\"149.424998\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- −2 -->\n",
       "      <g transform=\"translate(142.053905 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m411df9aa61\" x=\"210.456247\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(207.274997 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_4\">\n",
       "     <!-- x1 -->\n",
       "     <g transform=\"translate(134.129687 171.376563)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-78\" d=\"M 3513 3500 \n",
       "L 2247 1797 \n",
       "L 3578 0 \n",
       "L 2900 0 \n",
       "L 1881 1375 \n",
       "L 863 0 \n",
       "L 184 0 \n",
       "L 1544 1831 \n",
       "L 300 3500 \n",
       "L 978 3500 \n",
       "L 1906 2253 \n",
       "L 2834 3500 \n",
       "L 3513 3500 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <defs>\n",
       "       <path id=\"mfe31105eec\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mfe31105eec\" x=\"42.620312\" y=\"120.784729\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- −2 -->\n",
       "      <g transform=\"translate(20.878125 124.583948)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"83.789062\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mfe31105eec\" x=\"42.620312\" y=\"76.154187\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(29.257812 79.953406)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mfe31105eec\" x=\"42.620312\" y=\"31.523645\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 2 -->\n",
       "      <g transform=\"translate(29.257812 35.322864)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_8\">\n",
       "     <!-- x2 -->\n",
       "     <g transform=\"translate(14.798437 81.290625)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-78\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-32\" x=\"59.179688\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_7\">\n",
       "    <path d=\"M 57.878125 120.784729 \n",
       "L 76.187499 13.671429 \n",
       "L 96.877093 136.851724 \n",
       "L 115.67899 21.972709 \n",
       "L 131.752735 123.288502 \n",
       "L 145.215593 35.495094 \n",
       "L 156.410186 111.128565 \n",
       "L 165.694361 46.098425 \n",
       "L 173.386832 101.974719 \n",
       "L 179.758279 53.974517 \n",
       "L 185.034897 95.205676 \n",
       "L 189.404614 59.789893 \n",
       "L 193.023239 90.210253 \n",
       "L 196.019856 64.080785 \n",
       "L 198.501378 86.524583 \n",
       "L 200.556342 67.246582 \n",
       "L 202.258072 83.805334 \n",
       "L 203.667286 69.58227 \n",
       "L 204.834264 81.799106 \n",
       "L 205.800647 71.30551 \n",
       "L 206.600915 80.318936 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    <defs>\n",
       "     <path id=\"m3b18d42730\" d=\"M 0 3 \n",
       "C 0.795609 3 1.55874 2.683901 2.12132 2.12132 \n",
       "C 2.683901 1.55874 3 0.795609 3 0 \n",
       "C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132 \n",
       "C 1.55874 -2.683901 0.795609 -3 0 -3 \n",
       "C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132 \n",
       "C -2.683901 -1.55874 -3 -0.795609 -3 0 \n",
       "C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 \n",
       "C -1.55874 2.683901 -0.795609 3 0 3 \n",
       "z\n",
       "\" style=\"stroke: #ff7f0e\"/>\n",
       "    </defs>\n",
       "    <g clip-path=\"url(#pbb80998b09)\">\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"57.878125\" y=\"120.784729\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"76.187499\" y=\"13.671429\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"96.877093\" y=\"136.851724\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"115.67899\" y=\"21.972709\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"131.752735\" y=\"123.288502\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"145.215593\" y=\"35.495094\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"156.410186\" y=\"111.128565\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"165.694361\" y=\"46.098425\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"173.386832\" y=\"101.974719\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"179.758279\" y=\"53.974517\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"185.034897\" y=\"95.205676\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"189.404614\" y=\"59.789893\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"193.023239\" y=\"90.210253\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"196.019856\" y=\"64.080785\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"198.501378\" y=\"86.524583\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"200.556342\" y=\"67.246582\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"202.258072\" y=\"83.805334\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"203.667286\" y=\"69.58227\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"204.834264\" y=\"81.799106\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"205.800647\" y=\"71.30551\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "     <use xlink:href=\"#m3b18d42730\" x=\"206.600915\" y=\"80.318936\" style=\"fill: #ff7f0e; stroke: #ff7f0e\"/>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_1\">\n",
       "    <path d=\"M 210.456247 76.154187 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_2\">\n",
       "    <path d=\"M 237.920312 103.106571 \n",
       "L 234.868753 103.182443 \n",
       "L 231.817193 103.249389 \n",
       "L 228.765619 103.307409 \n",
       "L 225.71406 103.356502 \n",
       "L 222.6625 103.39667 \n",
       "L 219.610941 103.427911 \n",
       "L 216.559381 103.450227 \n",
       "L 213.507807 103.463616 \n",
       "L 210.456247 103.468079 \n",
       "L 207.404688 103.463616 \n",
       "L 204.353128 103.450227 \n",
       "L 201.301569 103.427911 \n",
       "L 198.249995 103.39667 \n",
       "L 195.198435 103.356502 \n",
       "L 192.146876 103.307409 \n",
       "L 189.095316 103.249389 \n",
       "L 186.043757 103.182444 \n",
       "L 182.992182 103.106571 \n",
       "L 179.940623 103.021774 \n",
       "L 177.03433 102.932511 \n",
       "L 176.889063 102.927661 \n",
       "L 173.837504 102.816085 \n",
       "L 170.785944 102.694807 \n",
       "L 167.73437 102.563825 \n",
       "L 164.682811 102.423143 \n",
       "L 161.631251 102.272756 \n",
       "L 158.579684 102.112669 \n",
       "L 155.528125 101.942879 \n",
       "L 152.476565 101.763386 \n",
       "L 149.424998 101.574191 \n",
       "L 146.373439 101.375295 \n",
       "L 143.321872 101.166696 \n",
       "L 140.270312 100.948394 \n",
       "L 137.218753 100.72039 \n",
       "L 136.969649 100.700986 \n",
       "L 134.167186 100.461893 \n",
       "L 131.115627 100.190923 \n",
       "L 128.06406 99.909324 \n",
       "L 125.0125 99.617101 \n",
       "L 121.960941 99.314251 \n",
       "L 118.909374 99.000774 \n",
       "L 115.857814 98.676672 \n",
       "L 113.968754 98.469458 \n",
       "L 112.806247 98.328519 \n",
       "L 109.754688 97.946811 \n",
       "L 106.703128 97.553357 \n",
       "L 103.651562 97.148159 \n",
       "L 100.600002 96.731216 \n",
       "L 97.548443 96.302528 \n",
       "L 97.100855 96.237928 \n",
       "L 94.496876 95.817878 \n",
       "L 91.445309 95.312502 \n",
       "L 88.393749 94.794001 \n",
       "L 85.34219 94.262372 \n",
       "L 83.908318 94.006403 \n",
       "L 82.29063 93.679115 \n",
       "L 79.239056 93.046845 \n",
       "L 76.187497 92.399703 \n",
       "L 73.307377 91.774878 \n",
       "L 73.135937 91.731963 \n",
       "L 70.084378 90.950928 \n",
       "L 67.032818 90.152729 \n",
       "L 64.752163 89.543348 \n",
       "L 63.981244 89.299909 \n",
       "L 60.929684 88.31601 \n",
       "L 57.878125 87.311823 \n",
       "L 54.826565 86.05969 \n",
       "L 52.486033 85.080292 \n",
       "L 51.775006 84.697753 \n",
       "L 48.723432 83.024097 \n",
       "L 48.409729 82.848767 \n",
       "L 45.671872 80.706502 \n",
       "L 45.55989 80.617242 \n",
       "L 43.880133 78.385712 \n",
       "L 43.320214 76.154187 \n",
       "L 43.880133 73.922657 \n",
       "L 45.55989 71.691132 \n",
       "L 45.671872 71.601872 \n",
       "L 48.409729 69.459607 \n",
       "L 48.723432 69.284278 \n",
       "L 51.775006 67.610623 \n",
       "L 52.486047 67.228077 \n",
       "L 54.826565 66.248684 \n",
       "L 57.878125 64.996552 \n",
       "L 60.929684 63.992365 \n",
       "L 63.981244 63.008465 \n",
       "L 64.752179 62.765021 \n",
       "L 67.032818 62.155645 \n",
       "L 70.084378 61.357446 \n",
       "L 73.135937 60.576411 \n",
       "L 73.307377 60.533496 \n",
       "L 76.187497 59.908672 \n",
       "L 79.239056 59.26153 \n",
       "L 82.29063 58.62926 \n",
       "L 83.908318 58.301972 \n",
       "L 85.34219 58.046002 \n",
       "L 88.393749 57.514373 \n",
       "L 91.445309 56.995872 \n",
       "L 94.496876 56.490496 \n",
       "L 97.100893 56.070441 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_3\">\n",
       "    <path d=\"M 237.920312 114.533265 \n",
       "L 234.868753 114.587459 \n",
       "L 231.817193 114.635277 \n",
       "L 228.765619 114.676721 \n",
       "L 225.71406 114.711787 \n",
       "L 222.6625 114.740479 \n",
       "L 219.610941 114.762794 \n",
       "L 216.559381 114.778732 \n",
       "L 213.507807 114.788297 \n",
       "L 210.456247 114.791484 \n",
       "L 207.404688 114.788297 \n",
       "L 204.353128 114.778732 \n",
       "L 201.301569 114.762794 \n",
       "L 198.249995 114.740479 \n",
       "L 195.198435 114.711787 \n",
       "L 192.146876 114.676721 \n",
       "L 189.095316 114.635278 \n",
       "L 186.043757 114.587459 \n",
       "L 182.992182 114.533265 \n",
       "L 179.940623 114.472695 \n",
       "L 176.889063 114.405749 \n",
       "L 173.837504 114.332427 \n",
       "L 170.785944 114.252729 \n",
       "L 167.73437 114.166656 \n",
       "L 165.208907 114.090146 \n",
       "L 164.682811 114.073242 \n",
       "L 161.631251 113.968427 \n",
       "L 158.579684 113.856851 \n",
       "L 155.528125 113.738513 \n",
       "L 152.476565 113.613412 \n",
       "L 149.424998 113.481548 \n",
       "L 146.373439 113.342924 \n",
       "L 143.321872 113.197536 \n",
       "L 140.270312 113.045387 \n",
       "L 137.218753 112.886476 \n",
       "L 134.167186 112.720801 \n",
       "L 131.115627 112.548364 \n",
       "L 128.06406 112.369166 \n",
       "L 125.0125 112.183206 \n",
       "L 121.960941 111.990483 \n",
       "L 119.943827 111.858621 \n",
       "L 118.909374 111.786635 \n",
       "L 115.857814 111.567082 \n",
       "L 112.806247 111.340329 \n",
       "L 109.754688 111.106379 \n",
       "L 106.703128 110.86523 \n",
       "L 103.651562 110.616884 \n",
       "L 100.600002 110.361338 \n",
       "L 97.548443 110.098594 \n",
       "L 94.496876 109.82865 \n",
       "L 92.277554 109.627094 \n",
       "L 91.445309 109.546297 \n",
       "L 88.393749 109.242348 \n",
       "L 85.34219 108.930704 \n",
       "L 82.29063 108.611365 \n",
       "L 79.239056 108.284329 \n",
       "L 76.187497 107.949601 \n",
       "L 73.135937 107.607177 \n",
       "L 71.291579 107.395566 \n",
       "L 70.084378 107.246799 \n",
       "L 67.032818 106.86248 \n",
       "L 63.981244 106.469895 \n",
       "L 60.929684 106.069047 \n",
       "L 57.878125 105.659934 \n",
       "L 54.826565 105.242557 \n",
       "L 54.263641 105.164038 \n",
       "L 51.775006 104.789143 \n",
       "L 48.723432 104.32052 \n",
       "L 45.671872 103.842976 \n",
       "L 42.620312 103.356502 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_4\">\n",
       "    <path d=\"M 237.920312 123.273141 \n",
       "L 234.868753 123.317254 \n",
       "L 231.817193 123.356176 \n",
       "L 228.765619 123.389908 \n",
       "L 225.71406 123.418452 \n",
       "L 222.6625 123.441805 \n",
       "L 219.610941 123.459968 \n",
       "L 216.559381 123.472942 \n",
       "L 213.507807 123.480725 \n",
       "L 210.456247 123.483321 \n",
       "L 207.404688 123.480725 \n",
       "L 204.353128 123.472942 \n",
       "L 201.301569 123.459968 \n",
       "L 198.249995 123.441805 \n",
       "L 195.198435 123.418452 \n",
       "L 192.146876 123.389908 \n",
       "L 189.095316 123.356176 \n",
       "L 186.043757 123.317254 \n",
       "L 182.992182 123.273141 \n",
       "L 179.940623 123.22384 \n",
       "L 176.889063 123.16935 \n",
       "L 173.837504 123.10967 \n",
       "L 170.785944 123.044801 \n",
       "L 169.542551 123.016254 \n",
       "L 167.73437 122.972715 \n",
       "L 164.682811 122.893794 \n",
       "L 161.631251 122.809434 \n",
       "L 158.579684 122.719629 \n",
       "L 155.528125 122.624378 \n",
       "L 152.476565 122.523688 \n",
       "L 149.424998 122.417556 \n",
       "L 146.373439 122.305978 \n",
       "L 143.321872 122.188959 \n",
       "L 140.270312 122.066496 \n",
       "L 137.218753 121.938592 \n",
       "L 134.167186 121.805245 \n",
       "L 131.115627 121.666456 \n",
       "L 128.06406 121.522222 \n",
       "L 125.0125 121.372545 \n",
       "L 121.960941 121.217429 \n",
       "L 118.909374 121.056868 \n",
       "L 115.857814 120.890862 \n",
       "L 113.968762 120.784729 \n",
       "L 112.806247 120.716066 \n",
       "L 109.754688 120.530107 \n",
       "L 106.703128 120.338424 \n",
       "L 103.651562 120.141019 \n",
       "L 100.600002 119.937894 \n",
       "L 97.548443 119.729046 \n",
       "L 94.496876 119.514475 \n",
       "L 91.445309 119.294183 \n",
       "L 88.393749 119.06817 \n",
       "L 85.34219 118.836434 \n",
       "L 82.29063 118.598978 \n",
       "L 81.716196 118.553201 \n",
       "L 79.239056 118.345126 \n",
       "L 76.187497 118.082771 \n",
       "L 73.135937 117.814386 \n",
       "L 70.084378 117.539969 \n",
       "L 67.032818 117.25952 \n",
       "L 63.981244 116.97304 \n",
       "L 60.929684 116.680529 \n",
       "L 57.878125 116.381987 \n",
       "L 57.273841 116.321674 \n",
       "L 54.826565 116.063456 \n",
       "L 51.775006 115.735104 \n",
       "L 48.723432 115.400373 \n",
       "L 45.671872 115.059267 \n",
       "L 42.620312 114.711786 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_5\">\n",
       "    <path d=\"M 237.920312 130.619388 \n",
       "L 234.868753 130.658098 \n",
       "L 231.817193 130.692255 \n",
       "L 228.765619 130.721856 \n",
       "L 225.71406 130.746905 \n",
       "L 222.6625 130.767398 \n",
       "L 219.610941 130.783338 \n",
       "L 216.559381 130.794723 \n",
       "L 213.507807 130.801553 \n",
       "L 210.456247 130.803831 \n",
       "L 207.404688 130.801553 \n",
       "L 204.353128 130.794723 \n",
       "L 201.301569 130.783338 \n",
       "L 198.249995 130.767398 \n",
       "L 195.198435 130.746905 \n",
       "L 192.146876 130.721856 \n",
       "L 189.095316 130.692255 \n",
       "L 186.043757 130.658098 \n",
       "L 182.992182 130.619388 \n",
       "L 179.940623 130.576123 \n",
       "L 176.889063 130.528305 \n",
       "L 173.837504 130.475933 \n",
       "L 170.785944 130.419007 \n",
       "L 167.73437 130.357525 \n",
       "L 164.682811 130.29149 \n",
       "L 161.631251 130.220903 \n",
       "L 158.579684 130.145759 \n",
       "L 155.528125 130.06606 \n",
       "L 152.476565 129.981809 \n",
       "L 149.424998 129.893005 \n",
       "L 146.373439 129.799644 \n",
       "L 143.605784 129.71084 \n",
       "L 143.321872 129.701342 \n",
       "L 140.270312 129.594513 \n",
       "L 137.218753 129.482937 \n",
       "L 134.167186 129.366613 \n",
       "L 131.115627 129.245542 \n",
       "L 128.06406 129.11972 \n",
       "L 125.0125 128.989152 \n",
       "L 121.960941 128.853837 \n",
       "L 118.909374 128.713773 \n",
       "L 115.857814 128.568959 \n",
       "L 112.806247 128.4194 \n",
       "L 109.754688 128.265093 \n",
       "L 106.703128 128.106036 \n",
       "L 103.651562 127.942232 \n",
       "L 100.600002 127.773682 \n",
       "L 97.548443 127.600383 \n",
       "L 95.473374 127.479309 \n",
       "L 94.496876 127.419802 \n",
       "L 91.445309 127.228883 \n",
       "L 88.393749 127.033003 \n",
       "L 85.34219 126.832168 \n",
       "L 82.29063 126.626371 \n",
       "L 79.239056 126.415616 \n",
       "L 76.187497 126.199902 \n",
       "L 73.135937 125.979229 \n",
       "L 70.084378 125.753596 \n",
       "L 67.032818 125.523006 \n",
       "L 63.981244 125.287455 \n",
       "L 63.477901 125.247784 \n",
       "L 60.929684 125.037605 \n",
       "L 57.878125 124.78072 \n",
       "L 54.826565 124.518646 \n",
       "L 51.775006 124.251382 \n",
       "L 48.723432 123.978927 \n",
       "L 45.671872 123.701283 \n",
       "L 42.620312 123.41845 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_6\">\n",
       "    <path d=\"M 237.920312 137.093134 \n",
       "L 234.868753 137.127621 \n",
       "L 231.817193 137.158052 \n",
       "L 228.765619 137.184424 \n",
       "L 225.71406 137.20674 \n",
       "L 222.6625 137.224998 \n",
       "L 219.610941 137.239198 \n",
       "L 216.559381 137.249342 \n",
       "L 213.507807 137.255427 \n",
       "L 210.456247 137.257456 \n",
       "L 207.404688 137.255427 \n",
       "L 204.353128 137.249342 \n",
       "L 201.301569 137.239198 \n",
       "L 198.249995 137.224998 \n",
       "L 195.198435 137.20674 \n",
       "L 192.146876 137.184424 \n",
       "L 189.095316 137.158052 \n",
       "L 186.043757 137.127621 \n",
       "L 182.992182 137.093134 \n",
       "L 179.940623 137.054589 \n",
       "L 176.889063 137.011987 \n",
       "L 173.837504 136.965329 \n",
       "L 170.785944 136.914613 \n",
       "L 167.73437 136.859838 \n",
       "L 164.682811 136.801006 \n",
       "L 161.631251 136.738119 \n",
       "L 158.579684 136.671174 \n",
       "L 155.528125 136.600169 \n",
       "L 152.476565 136.525109 \n",
       "L 149.424998 136.445992 \n",
       "L 147.936483 136.40542 \n",
       "L 146.373439 136.361209 \n",
       "L 143.321872 136.270684 \n",
       "L 140.270312 136.175949 \n",
       "L 137.218753 136.077004 \n",
       "L 134.167186 135.973849 \n",
       "L 131.115627 135.866484 \n",
       "L 128.06406 135.754907 \n",
       "L 125.0125 135.63912 \n",
       "L 121.960941 135.519124 \n",
       "L 118.909374 135.394917 \n",
       "L 115.857814 135.266498 \n",
       "L 112.806247 135.133869 \n",
       "L 109.754688 134.997031 \n",
       "L 106.703128 134.855981 \n",
       "L 103.651562 134.710721 \n",
       "L 100.600002 134.561253 \n",
       "L 97.548443 134.407572 \n",
       "L 94.496876 134.24968 \n",
       "L 93.070115 134.173889 \n",
       "L 91.445309 134.084194 \n",
       "L 88.393749 133.911359 \n",
       "L 85.34219 133.734151 \n",
       "L 82.29063 133.552565 \n",
       "L 79.239056 133.366605 \n",
       "L 76.187497 133.176269 \n",
       "L 73.135937 132.981557 \n",
       "L 70.084378 132.782469 \n",
       "L 67.032818 132.579007 \n",
       "L 63.981244 132.371168 \n",
       "L 60.929684 132.158954 \n",
       "L 57.878125 131.942365 \n",
       "L 54.826565 131.712381 \n",
       "L 51.775006 131.477844 \n",
       "L 48.723432 131.238751 \n",
       "L 45.671872 130.995104 \n",
       "L 42.620312 130.746905 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_7\">\n",
       "    <path d=\"M 210.456247 143.1 \n",
       "L 207.404688 143.09811 \n",
       "L 204.353128 143.092436 \n",
       "L 201.301569 143.082978 \n",
       "L 198.249995 143.069741 \n",
       "L 195.198435 143.052723 \n",
       "L 192.146876 143.031921 \n",
       "L 189.095316 143.007335 \n",
       "L 186.043757 142.97897 \n",
       "L 182.992182 142.94682 \n",
       "L 179.940623 142.910887 \n",
       "L 176.889063 142.871173 \n",
       "L 173.837504 142.82768 \n",
       "L 170.785944 142.780399 \n",
       "L 167.73437 142.729341 \n",
       "L 164.682811 142.674496 \n",
       "L 161.631251 142.615871 \n",
       "L 158.579684 142.553466 \n",
       "L 155.528125 142.487276 \n",
       "L 152.476565 142.417304 \n",
       "L 149.424998 142.343551 \n",
       "L 146.373439 142.266014 \n",
       "L 143.321872 142.184697 \n",
       "L 140.270312 142.099596 \n",
       "L 137.218753 142.010711 \n",
       "L 134.167186 141.918047 \n",
       "L 131.115627 141.821598 \n",
       "L 128.06406 141.721369 \n",
       "L 125.0125 141.617357 \n",
       "L 121.960941 141.509564 \n",
       "L 118.909374 141.397988 \n",
       "L 115.857814 141.282628 \n",
       "L 112.806247 141.163487 \n",
       "L 109.754688 141.040563 \n",
       "L 106.703128 140.913859 \n",
       "L 105.641795 140.868475 \n",
       "L 103.651562 140.780385 \n",
       "L 100.600002 140.641405 \n",
       "L 97.548443 140.498509 \n",
       "L 94.496876 140.351697 \n",
       "L 91.445309 140.200971 \n",
       "L 88.393749 140.046331 \n",
       "L 85.34219 139.887775 \n",
       "L 82.29063 139.725305 \n",
       "L 79.239056 139.558918 \n",
       "L 76.187497 139.388618 \n",
       "L 73.135937 139.214402 \n",
       "L 70.084378 139.036272 \n",
       "L 67.032818 138.854225 \n",
       "L 63.981244 138.668266 \n",
       "L 63.477871 138.636945 \n",
       "L 60.929684 138.472624 \n",
       "L 57.878125 138.271785 \n",
       "L 54.826565 138.066894 \n",
       "L 51.775006 137.857941 \n",
       "L 48.723432 137.644928 \n",
       "L 45.671872 137.427865 \n",
       "L 42.620312 137.206738 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "    <path d=\"M 237.920312 142.94682 \n",
       "L 234.868753 142.97897 \n",
       "L 231.817193 143.007335 \n",
       "L 228.765619 143.031921 \n",
       "L 225.71406 143.052723 \n",
       "L 222.6625 143.069741 \n",
       "L 219.610941 143.082978 \n",
       "L 216.559381 143.092436 \n",
       "L 213.507807 143.09811 \n",
       "L 210.456247 143.1 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_8\">\n",
       "    <path d=\"M 43.320206 143.1 \n",
       "L 42.620312 143.052723 \n",
       "\" clip-path=\"url(#pbb80998b09)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5\"/>\n",
       "   </g>\n",
       "   <g id=\"PathCollection_9\"/>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 42.620312 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 237.920313 143.1 \n",
       "L 237.920313 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 42.620312 143.1 \n",
       "L 237.920312 143.1 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 42.620312 7.2 \n",
       "L 237.920312 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pbb80998b09\">\n",
       "   <rect x=\"42.620312\" y=\"7.2\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "eta, beta = 0.6, 0.25\n",
    "d2l.show_trace_2d(f_2d, d2l.train_2d(momentum_2d))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0aa1dd43",
   "metadata": {},
   "source": [
    "#### 11.6.1.4. 有效样本权重"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "05774aba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"234.6408pt\" height=\"180.65625pt\" viewBox=\"0 0 234.6408 180.65625\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:06:07.357427</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 180.65625 \n",
       "L 234.6408 180.65625 \n",
       "L 234.6408 0 \n",
       "L 0 0 \n",
       "L 0 180.65625 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 30.103125 143.1 \n",
       "L 225.403125 143.1 \n",
       "L 225.403125 7.2 \n",
       "L 30.103125 7.2 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"m9274b10e56\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9274b10e56\" x=\"38.980398\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(35.799148 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9274b10e56\" x=\"84.504873\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 10 -->\n",
       "      <g transform=\"translate(78.142373 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9274b10e56\" x=\"130.029349\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 20 -->\n",
       "      <g transform=\"translate(123.666849 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9274b10e56\" x=\"175.553824\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 30 -->\n",
       "      <g transform=\"translate(169.191324 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-33\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m9274b10e56\" x=\"221.0783\" y=\"143.1\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 40 -->\n",
       "      <g transform=\"translate(214.7158 157.698438)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-34\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_6\">\n",
       "     <!-- time -->\n",
       "     <g transform=\"translate(116.457031 171.376563)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
       "L 1172 3500 \n",
       "L 2356 3500 \n",
       "L 2356 3053 \n",
       "L 1172 3053 \n",
       "L 1172 1153 \n",
       "Q 1172 725 1289 603 \n",
       "Q 1406 481 1766 481 \n",
       "L 2356 481 \n",
       "L 2356 0 \n",
       "L 1766 0 \n",
       "Q 1100 0 847 248 \n",
       "Q 594 497 594 1153 \n",
       "L 594 3053 \n",
       "L 172 3053 \n",
       "L 172 3500 \n",
       "L 594 3500 \n",
       "L 594 4494 \n",
       "L 1172 4494 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
       "L 1178 3500 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 3500 \n",
       "z\n",
       "M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 4134 \n",
       "L 603 4134 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6d\" d=\"M 3328 2828 \n",
       "Q 3544 3216 3844 3400 \n",
       "Q 4144 3584 4550 3584 \n",
       "Q 5097 3584 5394 3201 \n",
       "Q 5691 2819 5691 2113 \n",
       "L 5691 0 \n",
       "L 5113 0 \n",
       "L 5113 2094 \n",
       "Q 5113 2597 4934 2840 \n",
       "Q 4756 3084 4391 3084 \n",
       "Q 3944 3084 3684 2787 \n",
       "Q 3425 2491 3425 1978 \n",
       "L 3425 0 \n",
       "L 2847 0 \n",
       "L 2847 2094 \n",
       "Q 2847 2600 2669 2842 \n",
       "Q 2491 3084 2119 3084 \n",
       "Q 1678 3084 1418 2786 \n",
       "Q 1159 2488 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1356 3278 1631 3431 \n",
       "Q 1906 3584 2284 3584 \n",
       "Q 2666 3584 2933 3390 \n",
       "Q 3200 3197 3328 2828 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-74\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-69\" x=\"39.208984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6d\" x=\"66.992188\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"164.404297\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <defs>\n",
       "       <path id=\"m118ffc59cc\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m118ffc59cc\" x=\"30.103125\" y=\"136.922727\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0.0 -->\n",
       "      <g transform=\"translate(7.2 140.721946)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m118ffc59cc\" x=\"30.103125\" y=\"112.213636\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.2 -->\n",
       "      <g transform=\"translate(7.2 116.012855)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m118ffc59cc\" x=\"30.103125\" y=\"87.504545\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.4 -->\n",
       "      <g transform=\"translate(7.2 91.303764)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-34\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m118ffc59cc\" x=\"30.103125\" y=\"62.795455\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.6 -->\n",
       "      <g transform=\"translate(7.2 66.594673)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-36\" d=\"M 2113 2584 \n",
       "Q 1688 2584 1439 2293 \n",
       "Q 1191 2003 1191 1497 \n",
       "Q 1191 994 1439 701 \n",
       "Q 1688 409 2113 409 \n",
       "Q 2538 409 2786 701 \n",
       "Q 3034 994 3034 1497 \n",
       "Q 3034 2003 2786 2293 \n",
       "Q 2538 2584 2113 2584 \n",
       "z\n",
       "M 3366 4563 \n",
       "L 3366 3988 \n",
       "Q 3128 4100 2886 4159 \n",
       "Q 2644 4219 2406 4219 \n",
       "Q 1781 4219 1451 3797 \n",
       "Q 1122 3375 1075 2522 \n",
       "Q 1259 2794 1537 2939 \n",
       "Q 1816 3084 2150 3084 \n",
       "Q 2853 3084 3261 2657 \n",
       "Q 3669 2231 3669 1497 \n",
       "Q 3669 778 3244 343 \n",
       "Q 2819 -91 2113 -91 \n",
       "Q 1303 -91 875 529 \n",
       "Q 447 1150 447 2328 \n",
       "Q 447 3434 972 4092 \n",
       "Q 1497 4750 2381 4750 \n",
       "Q 2619 4750 2861 4703 \n",
       "Q 3103 4656 3366 4563 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-36\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m118ffc59cc\" x=\"30.103125\" y=\"38.086364\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.8 -->\n",
       "      <g transform=\"translate(7.2 41.885582)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-38\" d=\"M 2034 2216 \n",
       "Q 1584 2216 1326 1975 \n",
       "Q 1069 1734 1069 1313 \n",
       "Q 1069 891 1326 650 \n",
       "Q 1584 409 2034 409 \n",
       "Q 2484 409 2743 651 \n",
       "Q 3003 894 3003 1313 \n",
       "Q 3003 1734 2745 1975 \n",
       "Q 2488 2216 2034 2216 \n",
       "z\n",
       "M 1403 2484 \n",
       "Q 997 2584 770 2862 \n",
       "Q 544 3141 544 3541 \n",
       "Q 544 4100 942 4425 \n",
       "Q 1341 4750 2034 4750 \n",
       "Q 2731 4750 3128 4425 \n",
       "Q 3525 4100 3525 3541 \n",
       "Q 3525 3141 3298 2862 \n",
       "Q 3072 2584 2669 2484 \n",
       "Q 3125 2378 3379 2068 \n",
       "Q 3634 1759 3634 1313 \n",
       "Q 3634 634 3220 271 \n",
       "Q 2806 -91 2034 -91 \n",
       "Q 1263 -91 848 271 \n",
       "Q 434 634 434 1313 \n",
       "Q 434 1759 690 2068 \n",
       "Q 947 2378 1403 2484 \n",
       "z\n",
       "M 1172 3481 \n",
       "Q 1172 3119 1398 2916 \n",
       "Q 1625 2713 2034 2713 \n",
       "Q 2441 2713 2670 2916 \n",
       "Q 2900 3119 2900 3481 \n",
       "Q 2900 3844 2670 4047 \n",
       "Q 2441 4250 2034 4250 \n",
       "Q 1625 4250 1398 4047 \n",
       "Q 1172 3844 1172 3481 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-38\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m118ffc59cc\" x=\"30.103125\" y=\"13.377273\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 1.0 -->\n",
       "      <g transform=\"translate(7.2 17.176491)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_12\">\n",
       "    <path d=\"M 38.980398 13.377273 \n",
       "L 43.532845 19.554545 \n",
       "L 48.085293 25.422955 \n",
       "L 52.63774 30.997943 \n",
       "L 57.190188 36.294182 \n",
       "L 61.742635 41.32561 \n",
       "L 66.295083 46.105466 \n",
       "L 70.847531 50.646329 \n",
       "L 75.399978 54.960149 \n",
       "L 79.952426 59.058277 \n",
       "L 84.504873 62.9515 \n",
       "L 89.057321 66.650061 \n",
       "L 93.609768 70.163695 \n",
       "L 98.162216 73.501646 \n",
       "L 102.714663 76.6727 \n",
       "L 107.267111 79.685202 \n",
       "L 111.819559 82.547078 \n",
       "L 116.372006 85.26586 \n",
       "L 120.924454 87.848704 \n",
       "L 125.476901 90.302405 \n",
       "L 130.029349 92.633421 \n",
       "L 134.581796 94.847886 \n",
       "L 139.134244 96.951628 \n",
       "L 143.686691 98.950183 \n",
       "L 148.239139 100.848811 \n",
       "L 152.791587 102.652506 \n",
       "L 157.344034 104.366017 \n",
       "L 161.896482 105.993853 \n",
       "L 166.448929 107.540297 \n",
       "L 171.001377 109.009418 \n",
       "L 175.553824 110.405084 \n",
       "L 180.106272 111.730966 \n",
       "L 184.658719 112.990554 \n",
       "L 189.211167 114.187163 \n",
       "L 193.763615 115.323941 \n",
       "L 198.316062 116.40388 \n",
       "L 202.86851 117.429822 \n",
       "L 207.420957 118.404468 \n",
       "L 211.973405 119.330381 \n",
       "L 216.525852 120.209998 \n",
       "\" clip-path=\"url(#p4013c0b7d7)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"line2d_13\">\n",
       "    <path d=\"M 38.980398 13.377273 \n",
       "L 43.532845 25.731818 \n",
       "L 48.085293 36.850909 \n",
       "L 52.63774 46.858091 \n",
       "L 57.190188 55.864555 \n",
       "L 61.742635 63.970372 \n",
       "L 66.295083 71.265607 \n",
       "L 70.847531 77.831319 \n",
       "L 75.399978 83.74046 \n",
       "L 79.952426 89.058687 \n",
       "L 84.504873 93.845091 \n",
       "L 89.057321 98.152855 \n",
       "L 93.609768 102.029842 \n",
       "L 98.162216 105.51913 \n",
       "L 102.714663 108.65949 \n",
       "L 107.267111 111.485814 \n",
       "L 111.819559 114.029505 \n",
       "L 116.372006 116.318827 \n",
       "L 120.924454 118.379217 \n",
       "L 125.476901 120.233568 \n",
       "L 130.029349 121.902484 \n",
       "L 134.581796 123.404509 \n",
       "L 139.134244 124.75633 \n",
       "L 143.686691 125.97297 \n",
       "L 148.239139 127.067946 \n",
       "L 152.791587 128.053424 \n",
       "L 157.344034 128.940354 \n",
       "L 161.896482 129.738592 \n",
       "L 166.448929 130.457005 \n",
       "L 171.001377 131.103577 \n",
       "L 175.553824 131.685492 \n",
       "L 180.106272 132.209216 \n",
       "L 184.658719 132.680567 \n",
       "L 189.211167 133.104783 \n",
       "L 193.763615 133.486577 \n",
       "L 198.316062 133.830192 \n",
       "L 202.86851 134.139446 \n",
       "L 207.420957 134.417774 \n",
       "L 211.973405 134.668269 \n",
       "L 216.525852 134.893715 \n",
       "\" clip-path=\"url(#p4013c0b7d7)\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"line2d_14\">\n",
       "    <path d=\"M 38.980398 13.377273 \n",
       "L 43.532845 62.795455 \n",
       "L 48.085293 92.446364 \n",
       "L 52.63774 110.236909 \n",
       "L 57.190188 120.911236 \n",
       "L 61.742635 127.315833 \n",
       "L 66.295083 131.158591 \n",
       "L 70.847531 133.464245 \n",
       "L 75.399978 134.847638 \n",
       "L 79.952426 135.677674 \n",
       "L 84.504873 136.175695 \n",
       "L 89.057321 136.474508 \n",
       "L 93.609768 136.653796 \n",
       "L 98.162216 136.761368 \n",
       "L 102.714663 136.825912 \n",
       "L 107.267111 136.864638 \n",
       "L 111.819559 136.887874 \n",
       "L 116.372006 136.901815 \n",
       "L 120.924454 136.91018 \n",
       "L 125.476901 136.915199 \n",
       "L 130.029349 136.91821 \n",
       "L 134.581796 136.920017 \n",
       "L 139.134244 136.921101 \n",
       "L 143.686691 136.921752 \n",
       "L 148.239139 136.922142 \n",
       "L 152.791587 136.922376 \n",
       "L 157.344034 136.922517 \n",
       "L 161.896482 136.922601 \n",
       "L 166.448929 136.922651 \n",
       "L 171.001377 136.922682 \n",
       "L 175.553824 136.9227 \n",
       "L 180.106272 136.922711 \n",
       "L 184.658719 136.922717 \n",
       "L 189.211167 136.922721 \n",
       "L 193.763615 136.922724 \n",
       "L 198.316062 136.922725 \n",
       "L 202.86851 136.922726 \n",
       "L 207.420957 136.922727 \n",
       "L 211.973405 136.922727 \n",
       "L 216.525852 136.922727 \n",
       "\" clip-path=\"url(#p4013c0b7d7)\" style=\"fill: none; stroke: #2ca02c; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"line2d_15\">\n",
       "    <path d=\"M 38.980398 13.377273 \n",
       "L 43.532845 136.922727 \n",
       "L 48.085293 136.922727 \n",
       "L 52.63774 136.922727 \n",
       "L 57.190188 136.922727 \n",
       "L 61.742635 136.922727 \n",
       "L 66.295083 136.922727 \n",
       "L 70.847531 136.922727 \n",
       "L 75.399978 136.922727 \n",
       "L 79.952426 136.922727 \n",
       "L 84.504873 136.922727 \n",
       "L 89.057321 136.922727 \n",
       "L 93.609768 136.922727 \n",
       "L 98.162216 136.922727 \n",
       "L 102.714663 136.922727 \n",
       "L 107.267111 136.922727 \n",
       "L 111.819559 136.922727 \n",
       "L 116.372006 136.922727 \n",
       "L 120.924454 136.922727 \n",
       "L 125.476901 136.922727 \n",
       "L 130.029349 136.922727 \n",
       "L 134.581796 136.922727 \n",
       "L 139.134244 136.922727 \n",
       "L 143.686691 136.922727 \n",
       "L 148.239139 136.922727 \n",
       "L 152.791587 136.922727 \n",
       "L 157.344034 136.922727 \n",
       "L 161.896482 136.922727 \n",
       "L 166.448929 136.922727 \n",
       "L 171.001377 136.922727 \n",
       "L 175.553824 136.922727 \n",
       "L 180.106272 136.922727 \n",
       "L 184.658719 136.922727 \n",
       "L 189.211167 136.922727 \n",
       "L 193.763615 136.922727 \n",
       "L 198.316062 136.922727 \n",
       "L 202.86851 136.922727 \n",
       "L 207.420957 136.922727 \n",
       "L 211.973405 136.922727 \n",
       "L 216.525852 136.922727 \n",
       "\" clip-path=\"url(#p4013c0b7d7)\" style=\"fill: none; stroke: #d62728; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 30.103125 143.1 \n",
       "L 30.103125 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 225.403125 143.1 \n",
       "L 225.403125 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 30.103125 143.1 \n",
       "L 225.403125 143.1 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 30.103125 7.2 \n",
       "L 225.403125 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"legend_1\">\n",
       "    <g id=\"patch_7\">\n",
       "     <path d=\"M 126.851562 73.9125 \n",
       "L 218.403125 73.9125 \n",
       "Q 220.403125 73.9125 220.403125 71.9125 \n",
       "L 220.403125 14.2 \n",
       "Q 220.403125 12.2 218.403125 12.2 \n",
       "L 126.851562 12.2 \n",
       "Q 124.851562 12.2 124.851562 14.2 \n",
       "L 124.851562 71.9125 \n",
       "Q 124.851562 73.9125 126.851562 73.9125 \n",
       "z\n",
       "\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
       "    </g>\n",
       "    <g id=\"line2d_16\">\n",
       "     <path d=\"M 128.851562 20.298437 \n",
       "L 138.851562 20.298437 \n",
       "L 148.851562 20.298437 \n",
       "\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_13\">\n",
       "     <!-- beta = 0.95 -->\n",
       "     <g transform=\"translate(156.851562 23.798437)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-62\" d=\"M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "M 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2969 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
       "Q 1497 1759 1228 1600 \n",
       "Q 959 1441 959 1056 \n",
       "Q 959 750 1161 570 \n",
       "Q 1363 391 1709 391 \n",
       "Q 2188 391 2477 730 \n",
       "Q 2766 1069 2766 1631 \n",
       "L 2766 1759 \n",
       "L 2194 1759 \n",
       "z\n",
       "M 3341 1997 \n",
       "L 3341 0 \n",
       "L 2766 0 \n",
       "L 2766 531 \n",
       "Q 2569 213 2275 61 \n",
       "Q 1981 -91 1556 -91 \n",
       "Q 1019 -91 701 211 \n",
       "Q 384 513 384 1019 \n",
       "Q 384 1609 779 1909 \n",
       "Q 1175 2209 1959 2209 \n",
       "L 2766 2209 \n",
       "L 2766 2266 \n",
       "Q 2766 2663 2505 2880 \n",
       "Q 2244 3097 1772 3097 \n",
       "Q 1472 3097 1187 3025 \n",
       "Q 903 2953 641 2809 \n",
       "L 641 3341 \n",
       "Q 956 3463 1253 3523 \n",
       "Q 1550 3584 1831 3584 \n",
       "Q 2591 3584 2966 3190 \n",
       "Q 3341 2797 3341 1997 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-3d\" d=\"M 678 2906 \n",
       "L 4684 2906 \n",
       "L 4684 2381 \n",
       "L 678 2381 \n",
       "L 678 2906 \n",
       "z\n",
       "M 678 1631 \n",
       "L 4684 1631 \n",
       "L 4684 1100 \n",
       "L 678 1100 \n",
       "L 678 1631 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-39\" d=\"M 703 97 \n",
       "L 703 672 \n",
       "Q 941 559 1184 500 \n",
       "Q 1428 441 1663 441 \n",
       "Q 2288 441 2617 861 \n",
       "Q 2947 1281 2994 2138 \n",
       "Q 2813 1869 2534 1725 \n",
       "Q 2256 1581 1919 1581 \n",
       "Q 1219 1581 811 2004 \n",
       "Q 403 2428 403 3163 \n",
       "Q 403 3881 828 4315 \n",
       "Q 1253 4750 1959 4750 \n",
       "Q 2769 4750 3195 4129 \n",
       "Q 3622 3509 3622 2328 \n",
       "Q 3622 1225 3098 567 \n",
       "Q 2575 -91 1691 -91 \n",
       "Q 1453 -91 1209 -44 \n",
       "Q 966 3 703 97 \n",
       "z\n",
       "M 1959 2075 \n",
       "Q 2384 2075 2632 2365 \n",
       "Q 2881 2656 2881 3163 \n",
       "Q 2881 3666 2632 3958 \n",
       "Q 2384 4250 1959 4250 \n",
       "Q 1534 4250 1286 3958 \n",
       "Q 1038 3666 1038 3163 \n",
       "Q 1038 2656 1286 2365 \n",
       "Q 1534 2075 1959 2075 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-62\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"63.476562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"164.208984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"225.488281\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"257.275391\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"341.064453\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"372.851562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"436.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-39\" x=\"468.261719\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-35\" x=\"531.884766\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_17\">\n",
       "     <path d=\"M 128.851562 34.976562 \n",
       "L 138.851562 34.976562 \n",
       "L 148.851562 34.976562 \n",
       "\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_14\">\n",
       "     <!-- beta = 0.90 -->\n",
       "     <g transform=\"translate(156.851562 38.476562)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-62\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"63.476562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"164.208984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"225.488281\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"257.275391\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"341.064453\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"372.851562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"436.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-39\" x=\"468.261719\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"531.884766\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_18\">\n",
       "     <path d=\"M 128.851562 49.654687 \n",
       "L 138.851562 49.654687 \n",
       "L 148.851562 49.654687 \n",
       "\" style=\"fill: none; stroke: #2ca02c; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_15\">\n",
       "     <!-- beta = 0.60 -->\n",
       "     <g transform=\"translate(156.851562 53.154687)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-62\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"63.476562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"164.208984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"225.488281\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"257.275391\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"341.064453\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"372.851562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"436.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-36\" x=\"468.261719\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"531.884766\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_19\">\n",
       "     <path d=\"M 128.851562 64.332812 \n",
       "L 138.851562 64.332812 \n",
       "L 148.851562 64.332812 \n",
       "\" style=\"fill: none; stroke: #d62728; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_16\">\n",
       "     <!-- beta = 0.00 -->\n",
       "     <g transform=\"translate(156.851562 67.832812)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-62\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"63.476562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-74\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"164.208984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"225.488281\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"257.275391\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"341.064453\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"372.851562\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"436.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"468.261719\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"531.884766\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p4013c0b7d7\">\n",
       "   <rect x=\"30.103125\" y=\"7.2\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "d2l.set_figsize()\n",
    "betas = [0.95, 0.9, 0.6, 0]\n",
    "for beta in betas:\n",
    "    x = d2l.arange(40).asnumpy()\n",
    "    d2l.plt.plot(x, beta ** x, label=f'beta = {beta:.2f}')\n",
    "d2l.plt.xlabel('time')\n",
    "d2l.plt.legend();"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "74a5d999",
   "metadata": {},
   "source": [
    "### 11.6.2. 实际实验"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9e1ae39e",
   "metadata": {},
   "source": [
    "#### 11.6.2.1. 从零开始实现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "14f37565",
   "metadata": {},
   "outputs": [],
   "source": [
    "def init_momentum_states(feature_dim):\n",
    "    v_w = d2l.zeros((feature_dim, 1))\n",
    "    v_b = d2l.zeros(1)\n",
    "    return (v_w, v_b)\n",
    "    \n",
    "def sgd_momentum(params, grads, states, hyperparams):\n",
    "    for p, v, g in zip(params, states, grads):\n",
    "        v[:] = hyperparams['momentum'] * v + g\n",
    "        p[:] -= hyperparams['lr'] * v"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e0959cfc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "loss: 0.246, 0.371 sec/epoch\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"266.957813pt\" height=\"184.455469pt\" viewBox=\"0 0 266.957813 184.455469\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:06:17.110642</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M -0 184.455469 \n",
       "L 266.957813 184.455469 \n",
       "L 266.957813 0 \n",
       "L -0 0 \n",
       "L -0 184.455469 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "L 56.50625 10.999219 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_2\">\n",
       "      <defs>\n",
       "       <path id=\"m569fcc2b10\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m569fcc2b10\" x=\"56.50625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0.0 -->\n",
       "      <g transform=\"translate(48.554688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <path d=\"M 105.33125 146.899219 \n",
       "L 105.33125 10.999219 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m569fcc2b10\" x=\"105.33125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 0.5 -->\n",
       "      <g transform=\"translate(97.379688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <path d=\"M 154.15625 146.899219 \n",
       "L 154.15625 10.999219 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m569fcc2b10\" x=\"154.15625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 1.0 -->\n",
       "      <g transform=\"translate(146.204688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <path d=\"M 202.98125 146.899219 \n",
       "L 202.98125 10.999219 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m569fcc2b10\" x=\"202.98125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 1.5 -->\n",
       "      <g transform=\"translate(195.029688 161.497656)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m569fcc2b10\" x=\"251.80625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 2.0 -->\n",
       "      <g transform=\"translate(243.854688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_6\">\n",
       "     <!-- epoch -->\n",
       "     <g transform=\"translate(138.928125 175.175781)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-70\" d=\"M 1159 525 \n",
       "L 1159 -1331 \n",
       "L 581 -1331 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "z\n",
       "M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
       "Q 1497 3097 1228 2736 \n",
       "Q 959 2375 959 1747 \n",
       "Q 959 1119 1226 758 \n",
       "Q 1494 397 1959 397 \n",
       "Q 2419 397 2687 759 \n",
       "Q 2956 1122 2956 1747 \n",
       "Q 2956 2369 2687 2733 \n",
       "Q 2419 3097 1959 3097 \n",
       "z\n",
       "M 1959 3584 \n",
       "Q 2709 3584 3137 3096 \n",
       "Q 3566 2609 3566 1747 \n",
       "Q 3566 888 3137 398 \n",
       "Q 2709 -91 1959 -91 \n",
       "Q 1206 -91 779 398 \n",
       "Q 353 888 353 1747 \n",
       "Q 353 2609 779 3096 \n",
       "Q 1206 3584 1959 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-63\" d=\"M 3122 3366 \n",
       "L 3122 2828 \n",
       "Q 2878 2963 2633 3030 \n",
       "Q 2388 3097 2138 3097 \n",
       "Q 1578 3097 1268 2742 \n",
       "Q 959 2388 959 1747 \n",
       "Q 959 1106 1268 751 \n",
       "Q 1578 397 2138 397 \n",
       "Q 2388 397 2633 464 \n",
       "Q 2878 531 3122 666 \n",
       "L 3122 134 \n",
       "Q 2881 22 2623 -34 \n",
       "Q 2366 -91 2075 -91 \n",
       "Q 1284 -91 818 406 \n",
       "Q 353 903 353 1747 \n",
       "Q 353 2603 823 3093 \n",
       "Q 1294 3584 2113 3584 \n",
       "Q 2378 3584 2631 3529 \n",
       "Q 2884 3475 3122 3366 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-68\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-65\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-70\" x=\"61.523438\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-63\" x=\"186.181641\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-68\" x=\"241.162109\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <path d=\"M 56.50625 141.672296 \n",
       "L 251.80625 141.672296 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_12\">\n",
       "      <defs>\n",
       "       <path id=\"mb55ca090ea\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb55ca090ea\" x=\"56.50625\" y=\"141.672296\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0.225 -->\n",
       "      <g transform=\"translate(20.878125 145.471514)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <path d=\"M 56.50625 115.53768 \n",
       "L 251.80625 115.53768 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb55ca090ea\" x=\"56.50625\" y=\"115.53768\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.250 -->\n",
       "      <g transform=\"translate(20.878125 119.336899)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <path d=\"M 56.50625 89.403065 \n",
       "L 251.80625 89.403065 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb55ca090ea\" x=\"56.50625\" y=\"89.403065\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.275 -->\n",
       "      <g transform=\"translate(20.878125 93.202284)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
       "L 3525 4666 \n",
       "L 3525 4397 \n",
       "L 1831 0 \n",
       "L 1172 0 \n",
       "L 2766 4134 \n",
       "L 525 4134 \n",
       "L 525 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-37\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <path d=\"M 56.50625 63.26845 \n",
       "L 251.80625 63.26845 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_18\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb55ca090ea\" x=\"56.50625\" y=\"63.26845\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.300 -->\n",
       "      <g transform=\"translate(20.878125 67.067668)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_19\">\n",
       "      <path d=\"M 56.50625 37.133834 \n",
       "L 251.80625 37.133834 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_20\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb55ca090ea\" x=\"56.50625\" y=\"37.133834\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.325 -->\n",
       "      <g transform=\"translate(20.878125 40.933053)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_21\">\n",
       "      <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_22\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb55ca090ea\" x=\"56.50625\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.350 -->\n",
       "      <g transform=\"translate(20.878125 14.798437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_13\">\n",
       "     <!-- loss -->\n",
       "     <g transform=\"translate(14.798438 88.607031)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
       "L 2834 2853 \n",
       "Q 2591 2978 2328 3040 \n",
       "Q 2066 3103 1784 3103 \n",
       "Q 1356 3103 1142 2972 \n",
       "Q 928 2841 928 2578 \n",
       "Q 928 2378 1081 2264 \n",
       "Q 1234 2150 1697 2047 \n",
       "L 1894 2003 \n",
       "Q 2506 1872 2764 1633 \n",
       "Q 3022 1394 3022 966 \n",
       "Q 3022 478 2636 193 \n",
       "Q 2250 -91 1575 -91 \n",
       "Q 1294 -91 989 -36 \n",
       "Q 684 19 347 128 \n",
       "L 347 722 \n",
       "Q 666 556 975 473 \n",
       "Q 1284 391 1588 391 \n",
       "Q 1994 391 2212 530 \n",
       "Q 2431 669 2431 922 \n",
       "Q 2431 1156 2273 1281 \n",
       "Q 2116 1406 1581 1522 \n",
       "L 1381 1569 \n",
       "Q 847 1681 609 1914 \n",
       "Q 372 2147 372 2553 \n",
       "Q 372 3047 722 3315 \n",
       "Q 1072 3584 1716 3584 \n",
       "Q 2034 3584 2315 3537 \n",
       "Q 2597 3491 2834 3397 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"88.964844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"141.064453\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_23\">\n",
       "    <path d=\"M 69.52625 38.077882 \n",
       "L 82.54625 76.444979 \n",
       "L 95.56625 104.213839 \n",
       "L 108.58625 113.537306 \n",
       "L 121.60625 118.993989 \n",
       "L 134.62625 115.57157 \n",
       "L 147.64625 120.987385 \n",
       "L 160.66625 118.911427 \n",
       "L 173.68625 119.190406 \n",
       "L 186.70625 121.653688 \n",
       "L 199.72625 121.252626 \n",
       "L 212.74625 119.983174 \n",
       "L 225.76625 123.213294 \n",
       "L 238.78625 117.049719 \n",
       "L 251.80625 120.136449 \n",
       "\" clip-path=\"url(#pad43405bdd)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pad43405bdd\">\n",
       "   <rect x=\"56.50625\" y=\"10.999219\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "def train_momentum(lr, momentum, num_epochs=2):\n",
    "    d2l.train_ch11(sgd_momentum, init_momentum_states(feature_dim),\n",
    "                   {'lr': lr, 'momentum': momentum}, data_iter,\n",
    "                   feature_dim, num_epochs)\n",
    "\n",
    "data_iter, feature_dim = d2l.get_data_ch11(batch_size=10)\n",
    "train_momentum(0.02, 0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "598aa924",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "loss: 0.243, 0.420 sec/epoch\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"266.957813pt\" height=\"184.455469pt\" viewBox=\"0 0 266.957813 184.455469\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:06:27.877968</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M -0 184.455469 \n",
       "L 266.957813 184.455469 \n",
       "L 266.957813 0 \n",
       "L -0 0 \n",
       "L -0 184.455469 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "L 56.50625 10.999219 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_2\">\n",
       "      <defs>\n",
       "       <path id=\"mcb81d599a8\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mcb81d599a8\" x=\"56.50625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0.0 -->\n",
       "      <g transform=\"translate(48.554688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <path d=\"M 105.33125 146.899219 \n",
       "L 105.33125 10.999219 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mcb81d599a8\" x=\"105.33125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 0.5 -->\n",
       "      <g transform=\"translate(97.379688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <path d=\"M 154.15625 146.899219 \n",
       "L 154.15625 10.999219 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mcb81d599a8\" x=\"154.15625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 1.0 -->\n",
       "      <g transform=\"translate(146.204688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <path d=\"M 202.98125 146.899219 \n",
       "L 202.98125 10.999219 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mcb81d599a8\" x=\"202.98125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 1.5 -->\n",
       "      <g transform=\"translate(195.029688 161.497656)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mcb81d599a8\" x=\"251.80625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 2.0 -->\n",
       "      <g transform=\"translate(243.854688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_6\">\n",
       "     <!-- epoch -->\n",
       "     <g transform=\"translate(138.928125 175.175781)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-70\" d=\"M 1159 525 \n",
       "L 1159 -1331 \n",
       "L 581 -1331 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "z\n",
       "M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
       "Q 1497 3097 1228 2736 \n",
       "Q 959 2375 959 1747 \n",
       "Q 959 1119 1226 758 \n",
       "Q 1494 397 1959 397 \n",
       "Q 2419 397 2687 759 \n",
       "Q 2956 1122 2956 1747 \n",
       "Q 2956 2369 2687 2733 \n",
       "Q 2419 3097 1959 3097 \n",
       "z\n",
       "M 1959 3584 \n",
       "Q 2709 3584 3137 3096 \n",
       "Q 3566 2609 3566 1747 \n",
       "Q 3566 888 3137 398 \n",
       "Q 2709 -91 1959 -91 \n",
       "Q 1206 -91 779 398 \n",
       "Q 353 888 353 1747 \n",
       "Q 353 2609 779 3096 \n",
       "Q 1206 3584 1959 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-63\" d=\"M 3122 3366 \n",
       "L 3122 2828 \n",
       "Q 2878 2963 2633 3030 \n",
       "Q 2388 3097 2138 3097 \n",
       "Q 1578 3097 1268 2742 \n",
       "Q 959 2388 959 1747 \n",
       "Q 959 1106 1268 751 \n",
       "Q 1578 397 2138 397 \n",
       "Q 2388 397 2633 464 \n",
       "Q 2878 531 3122 666 \n",
       "L 3122 134 \n",
       "Q 2881 22 2623 -34 \n",
       "Q 2366 -91 2075 -91 \n",
       "Q 1284 -91 818 406 \n",
       "Q 353 903 353 1747 \n",
       "Q 353 2603 823 3093 \n",
       "Q 1294 3584 2113 3584 \n",
       "Q 2378 3584 2631 3529 \n",
       "Q 2884 3475 3122 3366 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-68\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-65\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-70\" x=\"61.523438\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-63\" x=\"186.181641\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-68\" x=\"241.162109\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <path d=\"M 56.50625 141.672296 \n",
       "L 251.80625 141.672296 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_12\">\n",
       "      <defs>\n",
       "       <path id=\"mbb93c78894\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mbb93c78894\" x=\"56.50625\" y=\"141.672296\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0.225 -->\n",
       "      <g transform=\"translate(20.878125 145.471514)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <path d=\"M 56.50625 115.53768 \n",
       "L 251.80625 115.53768 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mbb93c78894\" x=\"56.50625\" y=\"115.53768\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.250 -->\n",
       "      <g transform=\"translate(20.878125 119.336899)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <path d=\"M 56.50625 89.403065 \n",
       "L 251.80625 89.403065 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mbb93c78894\" x=\"56.50625\" y=\"89.403065\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.275 -->\n",
       "      <g transform=\"translate(20.878125 93.202284)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
       "L 3525 4666 \n",
       "L 3525 4397 \n",
       "L 1831 0 \n",
       "L 1172 0 \n",
       "L 2766 4134 \n",
       "L 525 4134 \n",
       "L 525 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-37\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <path d=\"M 56.50625 63.26845 \n",
       "L 251.80625 63.26845 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_18\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mbb93c78894\" x=\"56.50625\" y=\"63.26845\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.300 -->\n",
       "      <g transform=\"translate(20.878125 67.067668)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_19\">\n",
       "      <path d=\"M 56.50625 37.133834 \n",
       "L 251.80625 37.133834 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_20\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mbb93c78894\" x=\"56.50625\" y=\"37.133834\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.325 -->\n",
       "      <g transform=\"translate(20.878125 40.933053)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_21\">\n",
       "      <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_22\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mbb93c78894\" x=\"56.50625\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.350 -->\n",
       "      <g transform=\"translate(20.878125 14.798437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_13\">\n",
       "     <!-- loss -->\n",
       "     <g transform=\"translate(14.798438 88.607031)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
       "L 2834 2853 \n",
       "Q 2591 2978 2328 3040 \n",
       "Q 2066 3103 1784 3103 \n",
       "Q 1356 3103 1142 2972 \n",
       "Q 928 2841 928 2578 \n",
       "Q 928 2378 1081 2264 \n",
       "Q 1234 2150 1697 2047 \n",
       "L 1894 2003 \n",
       "Q 2506 1872 2764 1633 \n",
       "Q 3022 1394 3022 966 \n",
       "Q 3022 478 2636 193 \n",
       "Q 2250 -91 1575 -91 \n",
       "Q 1294 -91 989 -36 \n",
       "Q 684 19 347 128 \n",
       "L 347 722 \n",
       "Q 666 556 975 473 \n",
       "Q 1284 391 1588 391 \n",
       "Q 1994 391 2212 530 \n",
       "Q 2431 669 2431 922 \n",
       "Q 2431 1156 2273 1281 \n",
       "Q 2116 1406 1581 1522 \n",
       "L 1381 1569 \n",
       "Q 847 1681 609 1914 \n",
       "Q 372 2147 372 2553 \n",
       "Q 372 3047 722 3315 \n",
       "Q 1072 3584 1716 3584 \n",
       "Q 2034 3584 2315 3537 \n",
       "Q 2597 3491 2834 3397 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"88.964844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"141.064453\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_23\">\n",
       "    <path d=\"M 69.52625 81.907566 \n",
       "L 82.54625 102.996475 \n",
       "L 95.56625 116.618195 \n",
       "L 108.58625 118.147876 \n",
       "L 121.60625 118.556838 \n",
       "L 134.62625 112.759991 \n",
       "L 147.64625 120.850203 \n",
       "L 160.66625 118.076124 \n",
       "L 173.68625 107.277478 \n",
       "L 186.70625 103.981796 \n",
       "L 199.72625 119.226853 \n",
       "L 212.74625 118.490101 \n",
       "L 225.76625 113.592779 \n",
       "L 238.78625 118.046929 \n",
       "L 251.80625 123.187979 \n",
       "\" clip-path=\"url(#p250515564f)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p250515564f\">\n",
       "   <rect x=\"56.50625\" y=\"10.999219\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "train_momentum(0.01, 0.9)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "c9ed5b8d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "loss: 0.248, 0.473 sec/epoch\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"266.957813pt\" height=\"184.455469pt\" viewBox=\"0 0 266.957813 184.455469\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:06:39.917979</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M -0 184.455469 \n",
       "L 266.957813 184.455469 \n",
       "L 266.957813 0 \n",
       "L -0 0 \n",
       "L -0 184.455469 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "L 56.50625 10.999219 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_2\">\n",
       "      <defs>\n",
       "       <path id=\"m98898605ea\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m98898605ea\" x=\"56.50625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0.0 -->\n",
       "      <g transform=\"translate(48.554688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <path d=\"M 105.33125 146.899219 \n",
       "L 105.33125 10.999219 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m98898605ea\" x=\"105.33125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 0.5 -->\n",
       "      <g transform=\"translate(97.379688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <path d=\"M 154.15625 146.899219 \n",
       "L 154.15625 10.999219 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m98898605ea\" x=\"154.15625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 1.0 -->\n",
       "      <g transform=\"translate(146.204688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <path d=\"M 202.98125 146.899219 \n",
       "L 202.98125 10.999219 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m98898605ea\" x=\"202.98125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 1.5 -->\n",
       "      <g transform=\"translate(195.029688 161.497656)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m98898605ea\" x=\"251.80625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 2.0 -->\n",
       "      <g transform=\"translate(243.854688 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_6\">\n",
       "     <!-- epoch -->\n",
       "     <g transform=\"translate(138.928125 175.175781)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-70\" d=\"M 1159 525 \n",
       "L 1159 -1331 \n",
       "L 581 -1331 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "z\n",
       "M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
       "Q 1497 3097 1228 2736 \n",
       "Q 959 2375 959 1747 \n",
       "Q 959 1119 1226 758 \n",
       "Q 1494 397 1959 397 \n",
       "Q 2419 397 2687 759 \n",
       "Q 2956 1122 2956 1747 \n",
       "Q 2956 2369 2687 2733 \n",
       "Q 2419 3097 1959 3097 \n",
       "z\n",
       "M 1959 3584 \n",
       "Q 2709 3584 3137 3096 \n",
       "Q 3566 2609 3566 1747 \n",
       "Q 3566 888 3137 398 \n",
       "Q 2709 -91 1959 -91 \n",
       "Q 1206 -91 779 398 \n",
       "Q 353 888 353 1747 \n",
       "Q 353 2609 779 3096 \n",
       "Q 1206 3584 1959 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-63\" d=\"M 3122 3366 \n",
       "L 3122 2828 \n",
       "Q 2878 2963 2633 3030 \n",
       "Q 2388 3097 2138 3097 \n",
       "Q 1578 3097 1268 2742 \n",
       "Q 959 2388 959 1747 \n",
       "Q 959 1106 1268 751 \n",
       "Q 1578 397 2138 397 \n",
       "Q 2388 397 2633 464 \n",
       "Q 2878 531 3122 666 \n",
       "L 3122 134 \n",
       "Q 2881 22 2623 -34 \n",
       "Q 2366 -91 2075 -91 \n",
       "Q 1284 -91 818 406 \n",
       "Q 353 903 353 1747 \n",
       "Q 353 2603 823 3093 \n",
       "Q 1294 3584 2113 3584 \n",
       "Q 2378 3584 2631 3529 \n",
       "Q 2884 3475 3122 3366 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-68\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-65\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-70\" x=\"61.523438\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-63\" x=\"186.181641\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-68\" x=\"241.162109\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <path d=\"M 56.50625 141.672296 \n",
       "L 251.80625 141.672296 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_12\">\n",
       "      <defs>\n",
       "       <path id=\"m059d6491a2\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m059d6491a2\" x=\"56.50625\" y=\"141.672296\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0.225 -->\n",
       "      <g transform=\"translate(20.878125 145.471514)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <path d=\"M 56.50625 115.53768 \n",
       "L 251.80625 115.53768 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m059d6491a2\" x=\"56.50625\" y=\"115.53768\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.250 -->\n",
       "      <g transform=\"translate(20.878125 119.336899)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <path d=\"M 56.50625 89.403065 \n",
       "L 251.80625 89.403065 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m059d6491a2\" x=\"56.50625\" y=\"89.403065\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.275 -->\n",
       "      <g transform=\"translate(20.878125 93.202284)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
       "L 3525 4666 \n",
       "L 3525 4397 \n",
       "L 1831 0 \n",
       "L 1172 0 \n",
       "L 2766 4134 \n",
       "L 525 4134 \n",
       "L 525 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-37\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <path d=\"M 56.50625 63.26845 \n",
       "L 251.80625 63.26845 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_18\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m059d6491a2\" x=\"56.50625\" y=\"63.26845\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.300 -->\n",
       "      <g transform=\"translate(20.878125 67.067668)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_19\">\n",
       "      <path d=\"M 56.50625 37.133834 \n",
       "L 251.80625 37.133834 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_20\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m059d6491a2\" x=\"56.50625\" y=\"37.133834\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.325 -->\n",
       "      <g transform=\"translate(20.878125 40.933053)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_21\">\n",
       "      <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_22\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m059d6491a2\" x=\"56.50625\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.350 -->\n",
       "      <g transform=\"translate(20.878125 14.798437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_13\">\n",
       "     <!-- loss -->\n",
       "     <g transform=\"translate(14.798438 88.607031)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
       "L 2834 2853 \n",
       "Q 2591 2978 2328 3040 \n",
       "Q 2066 3103 1784 3103 \n",
       "Q 1356 3103 1142 2972 \n",
       "Q 928 2841 928 2578 \n",
       "Q 928 2378 1081 2264 \n",
       "Q 1234 2150 1697 2047 \n",
       "L 1894 2003 \n",
       "Q 2506 1872 2764 1633 \n",
       "Q 3022 1394 3022 966 \n",
       "Q 3022 478 2636 193 \n",
       "Q 2250 -91 1575 -91 \n",
       "Q 1294 -91 989 -36 \n",
       "Q 684 19 347 128 \n",
       "L 347 722 \n",
       "Q 666 556 975 473 \n",
       "Q 1284 391 1588 391 \n",
       "Q 1994 391 2212 530 \n",
       "Q 2431 669 2431 922 \n",
       "Q 2431 1156 2273 1281 \n",
       "Q 2116 1406 1581 1522 \n",
       "L 1381 1569 \n",
       "Q 847 1681 609 1914 \n",
       "Q 372 2147 372 2553 \n",
       "Q 372 3047 722 3315 \n",
       "Q 1072 3584 1716 3584 \n",
       "Q 2034 3584 2315 3537 \n",
       "Q 2597 3491 2834 3397 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"88.964844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"141.064453\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_23\">\n",
       "    <path d=\"M 69.52625 10.829419 \n",
       "L 82.54625 92.378979 \n",
       "L 95.56625 117.0856 \n",
       "L 108.58625 115.636176 \n",
       "L 121.60625 120.773209 \n",
       "L 134.62625 122.565364 \n",
       "L 147.64625 120.517787 \n",
       "L 160.66625 121.284916 \n",
       "L 173.68625 119.757373 \n",
       "L 186.70625 121.031939 \n",
       "L 199.72625 120.438595 \n",
       "L 212.74625 120.190264 \n",
       "L 225.76625 119.744615 \n",
       "L 238.78625 117.387983 \n",
       "L 251.80625 117.948712 \n",
       "\" clip-path=\"url(#p071f082d6a)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"p071f082d6a\">\n",
       "   <rect x=\"56.50625\" y=\"10.999219\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "train_momentum(0.005, 0.9)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "49364780",
   "metadata": {},
   "source": [
    "#### 11.6.2.2. 简洁实现"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "551493e5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "loss: 0.254, 0.079 sec/epoch\n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"262.1875pt\" height=\"184.455469pt\" viewBox=\"0 0 262.1875 184.455469\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:06:54.117553</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M -0 184.455469 \n",
       "L 262.1875 184.455469 \n",
       "L 262.1875 0 \n",
       "L -0 0 \n",
       "L -0 184.455469 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "L 56.50625 10.999219 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_2\">\n",
       "      <defs>\n",
       "       <path id=\"m1a6aa5a9a1\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1a6aa5a9a1\" x=\"56.50625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0 -->\n",
       "      <g transform=\"translate(53.325 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <path d=\"M 105.33125 146.899219 \n",
       "L 105.33125 10.999219 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1a6aa5a9a1\" x=\"105.33125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 1 -->\n",
       "      <g transform=\"translate(102.15 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <path d=\"M 154.15625 146.899219 \n",
       "L 154.15625 10.999219 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1a6aa5a9a1\" x=\"154.15625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 2 -->\n",
       "      <g transform=\"translate(150.975 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <path d=\"M 202.98125 146.899219 \n",
       "L 202.98125 10.999219 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1a6aa5a9a1\" x=\"202.98125\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 3 -->\n",
       "      <g transform=\"translate(199.8 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-33\" d=\"M 2597 2516 \n",
       "Q 3050 2419 3304 2112 \n",
       "Q 3559 1806 3559 1356 \n",
       "Q 3559 666 3084 287 \n",
       "Q 2609 -91 1734 -91 \n",
       "Q 1441 -91 1130 -33 \n",
       "Q 819 25 488 141 \n",
       "L 488 750 \n",
       "Q 750 597 1062 519 \n",
       "Q 1375 441 1716 441 \n",
       "Q 2309 441 2620 675 \n",
       "Q 2931 909 2931 1356 \n",
       "Q 2931 1769 2642 2001 \n",
       "Q 2353 2234 1838 2234 \n",
       "L 1294 2234 \n",
       "L 1294 2753 \n",
       "L 1863 2753 \n",
       "Q 2328 2753 2575 2939 \n",
       "Q 2822 3125 2822 3475 \n",
       "Q 2822 3834 2567 4026 \n",
       "Q 2313 4219 1838 4219 \n",
       "Q 1578 4219 1281 4162 \n",
       "Q 984 4106 628 3988 \n",
       "L 628 4550 \n",
       "Q 988 4650 1302 4700 \n",
       "Q 1616 4750 1894 4750 \n",
       "Q 2613 4750 3031 4423 \n",
       "Q 3450 4097 3450 3541 \n",
       "Q 3450 3153 3228 2886 \n",
       "Q 3006 2619 2597 2516 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-33\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m1a6aa5a9a1\" x=\"251.80625\" y=\"146.899219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 4 -->\n",
       "      <g transform=\"translate(248.625 161.497656)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-34\" d=\"M 2419 4116 \n",
       "L 825 1625 \n",
       "L 2419 1625 \n",
       "L 2419 4116 \n",
       "z\n",
       "M 2253 4666 \n",
       "L 3047 4666 \n",
       "L 3047 1625 \n",
       "L 3713 1625 \n",
       "L 3713 1100 \n",
       "L 3047 1100 \n",
       "L 3047 0 \n",
       "L 2419 0 \n",
       "L 2419 1100 \n",
       "L 313 1100 \n",
       "L 313 1709 \n",
       "L 2253 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-34\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_6\">\n",
       "     <!-- epoch -->\n",
       "     <g transform=\"translate(138.928125 175.175781)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-70\" d=\"M 1159 525 \n",
       "L 1159 -1331 \n",
       "L 581 -1331 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "z\n",
       "M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6f\" d=\"M 1959 3097 \n",
       "Q 1497 3097 1228 2736 \n",
       "Q 959 2375 959 1747 \n",
       "Q 959 1119 1226 758 \n",
       "Q 1494 397 1959 397 \n",
       "Q 2419 397 2687 759 \n",
       "Q 2956 1122 2956 1747 \n",
       "Q 2956 2369 2687 2733 \n",
       "Q 2419 3097 1959 3097 \n",
       "z\n",
       "M 1959 3584 \n",
       "Q 2709 3584 3137 3096 \n",
       "Q 3566 2609 3566 1747 \n",
       "Q 3566 888 3137 398 \n",
       "Q 2709 -91 1959 -91 \n",
       "Q 1206 -91 779 398 \n",
       "Q 353 888 353 1747 \n",
       "Q 353 2609 779 3096 \n",
       "Q 1206 3584 1959 3584 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-63\" d=\"M 3122 3366 \n",
       "L 3122 2828 \n",
       "Q 2878 2963 2633 3030 \n",
       "Q 2388 3097 2138 3097 \n",
       "Q 1578 3097 1268 2742 \n",
       "Q 959 2388 959 1747 \n",
       "Q 959 1106 1268 751 \n",
       "Q 1578 397 2138 397 \n",
       "Q 2388 397 2633 464 \n",
       "Q 2878 531 3122 666 \n",
       "L 3122 134 \n",
       "Q 2881 22 2623 -34 \n",
       "Q 2366 -91 2075 -91 \n",
       "Q 1284 -91 818 406 \n",
       "Q 353 903 353 1747 \n",
       "Q 353 2603 823 3093 \n",
       "Q 1294 3584 2113 3584 \n",
       "Q 2378 3584 2631 3529 \n",
       "Q 2884 3475 3122 3366 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-68\" d=\"M 3513 2113 \n",
       "L 3513 0 \n",
       "L 2938 0 \n",
       "L 2938 2094 \n",
       "Q 2938 2591 2744 2837 \n",
       "Q 2550 3084 2163 3084 \n",
       "Q 1697 3084 1428 2787 \n",
       "Q 1159 2491 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2956 \n",
       "Q 1366 3272 1645 3428 \n",
       "Q 1925 3584 2291 3584 \n",
       "Q 2894 3584 3203 3211 \n",
       "Q 3513 2838 3513 2113 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-65\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-70\" x=\"61.523438\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"125\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-63\" x=\"186.181641\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-68\" x=\"241.162109\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <path d=\"M 56.50625 141.672296 \n",
       "L 251.80625 141.672296 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_12\">\n",
       "      <defs>\n",
       "       <path id=\"mb7ab1bebd4\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb7ab1bebd4\" x=\"56.50625\" y=\"141.672296\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 0.225 -->\n",
       "      <g transform=\"translate(20.878125 145.471514)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <path d=\"M 56.50625 115.53768 \n",
       "L 251.80625 115.53768 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb7ab1bebd4\" x=\"56.50625\" y=\"115.53768\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 0.250 -->\n",
       "      <g transform=\"translate(20.878125 119.336899)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <path d=\"M 56.50625 89.403065 \n",
       "L 251.80625 89.403065 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb7ab1bebd4\" x=\"56.50625\" y=\"89.403065\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_9\">\n",
       "      <!-- 0.275 -->\n",
       "      <g transform=\"translate(20.878125 93.202284)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
       "L 3525 4666 \n",
       "L 3525 4397 \n",
       "L 1831 0 \n",
       "L 1172 0 \n",
       "L 2766 4134 \n",
       "L 525 4134 \n",
       "L 525 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-37\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_17\">\n",
       "      <path d=\"M 56.50625 63.26845 \n",
       "L 251.80625 63.26845 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_18\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb7ab1bebd4\" x=\"56.50625\" y=\"63.26845\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- 0.300 -->\n",
       "      <g transform=\"translate(20.878125 67.067668)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_19\">\n",
       "      <path d=\"M 56.50625 37.133834 \n",
       "L 251.80625 37.133834 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_20\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb7ab1bebd4\" x=\"56.50625\" y=\"37.133834\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- 0.325 -->\n",
       "      <g transform=\"translate(20.878125 40.933053)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_21\">\n",
       "      <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
       "     </g>\n",
       "     <g id=\"line2d_22\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mb7ab1bebd4\" x=\"56.50625\" y=\"10.999219\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- 0.350 -->\n",
       "      <g transform=\"translate(20.878125 14.798437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-33\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"222.65625\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_13\">\n",
       "     <!-- loss -->\n",
       "     <g transform=\"translate(14.798438 88.607031)rotate(-90)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-73\" d=\"M 2834 3397 \n",
       "L 2834 2853 \n",
       "Q 2591 2978 2328 3040 \n",
       "Q 2066 3103 1784 3103 \n",
       "Q 1356 3103 1142 2972 \n",
       "Q 928 2841 928 2578 \n",
       "Q 928 2378 1081 2264 \n",
       "Q 1234 2150 1697 2047 \n",
       "L 1894 2003 \n",
       "Q 2506 1872 2764 1633 \n",
       "Q 3022 1394 3022 966 \n",
       "Q 3022 478 2636 193 \n",
       "Q 2250 -91 1575 -91 \n",
       "Q 1294 -91 989 -36 \n",
       "Q 684 19 347 128 \n",
       "L 347 722 \n",
       "Q 666 556 975 473 \n",
       "Q 1284 391 1588 391 \n",
       "Q 1994 391 2212 530 \n",
       "Q 2431 669 2431 922 \n",
       "Q 2431 1156 2273 1281 \n",
       "Q 2116 1406 1581 1522 \n",
       "L 1381 1569 \n",
       "Q 847 1681 609 1914 \n",
       "Q 372 2147 372 2553 \n",
       "Q 372 3047 722 3315 \n",
       "Q 1072 3584 1716 3584 \n",
       "Q 2034 3584 2315 3537 \n",
       "Q 2597 3491 2834 3397 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6f\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"88.964844\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-73\" x=\"141.064453\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_23\">\n",
       "    <path d=\"M 63.01625 68.771164 \n",
       "L 69.52625 115.912952 \n",
       "L 76.03625 103.116203 \n",
       "L 82.54625 107.587135 \n",
       "L 89.05625 117.763981 \n",
       "L 95.56625 118.233137 \n",
       "L 102.07625 110.497899 \n",
       "L 108.58625 115.98804 \n",
       "L 115.09625 116.327325 \n",
       "L 121.60625 118.819869 \n",
       "L 128.11625 114.774606 \n",
       "L 134.62625 121.518373 \n",
       "L 141.13625 119.534832 \n",
       "L 147.64625 123.339399 \n",
       "L 154.15625 112.768772 \n",
       "L 160.66625 115.693796 \n",
       "L 167.17625 118.119695 \n",
       "L 173.68625 120.178888 \n",
       "L 180.19625 122.654409 \n",
       "L 186.70625 114.060633 \n",
       "L 193.21625 117.509366 \n",
       "L 199.72625 111.321036 \n",
       "L 206.23625 122.118251 \n",
       "L 212.74625 117.812076 \n",
       "L 219.25625 112.142391 \n",
       "L 225.76625 115.587483 \n",
       "L 232.27625 122.813352 \n",
       "L 238.78625 119.061079 \n",
       "L 245.29625 119.886736 \n",
       "L 251.80625 111.715844 \n",
       "\" clip-path=\"url(#pbea33d5c6c)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 56.50625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 251.80625 146.899219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 56.50625 146.899219 \n",
       "L 251.80625 146.899219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 56.50625 10.999219 \n",
       "L 251.80625 10.999219 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pbea33d5c6c\">\n",
       "   <rect x=\"56.50625\" y=\"10.999219\" width=\"195.3\" height=\"135.9\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 252x180 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "trainer = mindspore.nn.SGD\n",
    "d2l.train_concise_ch11(trainer, {'learning_rate': 0.005, 'momentum': 0.9}, data_iter)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ed11be43",
   "metadata": {},
   "source": [
    "#### 11.6.3.2. 标量函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "b4d67a1d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       "  \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"386.845312pt\" height=\"262.19625pt\" viewBox=\"0 0 386.845312 262.19625\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n",
       " <metadata>\n",
       "  <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
       "   <cc:Work>\n",
       "    <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
       "    <dc:date>2023-03-03T02:06:54.236235</dc:date>\n",
       "    <dc:format>image/svg+xml</dc:format>\n",
       "    <dc:creator>\n",
       "     <cc:Agent>\n",
       "      <dc:title>Matplotlib v3.5.1, https://matplotlib.org/</dc:title>\n",
       "     </cc:Agent>\n",
       "    </dc:creator>\n",
       "   </cc:Work>\n",
       "  </rdf:RDF>\n",
       " </metadata>\n",
       " <defs>\n",
       "  <style type=\"text/css\">*{stroke-linejoin: round; stroke-linecap: butt}</style>\n",
       " </defs>\n",
       " <g id=\"figure_1\">\n",
       "  <g id=\"patch_1\">\n",
       "   <path d=\"M 0 262.19625 \n",
       "L 386.845312 262.19625 \n",
       "L 386.845312 0 \n",
       "L 0 0 \n",
       "L 0 262.19625 \n",
       "z\n",
       "\" style=\"fill: none\"/>\n",
       "  </g>\n",
       "  <g id=\"axes_1\">\n",
       "   <g id=\"patch_2\">\n",
       "    <path d=\"M 44.845313 224.64 \n",
       "L 379.645313 224.64 \n",
       "L 379.645313 7.2 \n",
       "L 44.845313 7.2 \n",
       "z\n",
       "\" style=\"fill: #ffffff\"/>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_1\">\n",
       "    <g id=\"xtick_1\">\n",
       "     <g id=\"line2d_1\">\n",
       "      <defs>\n",
       "       <path id=\"m2b48c5b37b\" d=\"M 0 0 \n",
       "L 0 3.5 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"60.063494\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_1\">\n",
       "      <!-- 0.0 -->\n",
       "      <g transform=\"translate(52.111932 239.238437)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-30\" d=\"M 2034 4250 \n",
       "Q 1547 4250 1301 3770 \n",
       "Q 1056 3291 1056 2328 \n",
       "Q 1056 1369 1301 889 \n",
       "Q 1547 409 2034 409 \n",
       "Q 2525 409 2770 889 \n",
       "Q 3016 1369 3016 2328 \n",
       "Q 3016 3291 2770 3770 \n",
       "Q 2525 4250 2034 4250 \n",
       "z\n",
       "M 2034 4750 \n",
       "Q 2819 4750 3233 4129 \n",
       "Q 3647 3509 3647 2328 \n",
       "Q 3647 1150 3233 529 \n",
       "Q 2819 -91 2034 -91 \n",
       "Q 1250 -91 836 529 \n",
       "Q 422 1150 422 2328 \n",
       "Q 422 3509 836 4129 \n",
       "Q 1250 4750 2034 4750 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-2e\" d=\"M 684 794 \n",
       "L 1344 794 \n",
       "L 1344 0 \n",
       "L 684 0 \n",
       "L 684 794 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_2\">\n",
       "     <g id=\"line2d_2\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"100.111341\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_2\">\n",
       "      <!-- 2.5 -->\n",
       "      <g transform=\"translate(92.159779 239.238437)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-32\" d=\"M 1228 531 \n",
       "L 3431 531 \n",
       "L 3431 0 \n",
       "L 469 0 \n",
       "L 469 531 \n",
       "Q 828 903 1448 1529 \n",
       "Q 2069 2156 2228 2338 \n",
       "Q 2531 2678 2651 2914 \n",
       "Q 2772 3150 2772 3378 \n",
       "Q 2772 3750 2511 3984 \n",
       "Q 2250 4219 1831 4219 \n",
       "Q 1534 4219 1204 4116 \n",
       "Q 875 4013 500 3803 \n",
       "L 500 4441 \n",
       "Q 881 4594 1212 4672 \n",
       "Q 1544 4750 1819 4750 \n",
       "Q 2544 4750 2975 4387 \n",
       "Q 3406 4025 3406 3419 \n",
       "Q 3406 3131 3298 2873 \n",
       "Q 3191 2616 2906 2266 \n",
       "Q 2828 2175 2409 1742 \n",
       "Q 1991 1309 1228 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "        <path id=\"DejaVuSans-35\" d=\"M 691 4666 \n",
       "L 3169 4666 \n",
       "L 3169 4134 \n",
       "L 1269 4134 \n",
       "L 1269 2991 \n",
       "Q 1406 3038 1543 3061 \n",
       "Q 1681 3084 1819 3084 \n",
       "Q 2600 3084 3056 2656 \n",
       "Q 3513 2228 3513 1497 \n",
       "Q 3513 744 3044 326 \n",
       "Q 2575 -91 1722 -91 \n",
       "Q 1428 -91 1123 -41 \n",
       "Q 819 9 494 109 \n",
       "L 494 744 \n",
       "Q 775 591 1075 516 \n",
       "Q 1375 441 1709 441 \n",
       "Q 2250 441 2565 725 \n",
       "Q 2881 1009 2881 1497 \n",
       "Q 2881 1984 2565 2268 \n",
       "Q 2250 2553 1709 2553 \n",
       "Q 1456 2553 1204 2497 \n",
       "Q 953 2441 691 2322 \n",
       "L 691 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-32\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_3\">\n",
       "     <g id=\"line2d_3\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"140.159188\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_3\">\n",
       "      <!-- 5.0 -->\n",
       "      <g transform=\"translate(132.207626 239.238437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-35\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_4\">\n",
       "     <g id=\"line2d_4\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"180.207035\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_4\">\n",
       "      <!-- 7.5 -->\n",
       "      <g transform=\"translate(172.255472 239.238437)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-37\" d=\"M 525 4666 \n",
       "L 3525 4666 \n",
       "L 3525 4397 \n",
       "L 1831 0 \n",
       "L 1172 0 \n",
       "L 2766 4134 \n",
       "L 525 4134 \n",
       "L 525 4666 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-37\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_5\">\n",
       "     <g id=\"line2d_5\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"220.254882\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_5\">\n",
       "      <!-- 10.0 -->\n",
       "      <g transform=\"translate(209.122069 239.238437)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-31\" d=\"M 794 531 \n",
       "L 1825 531 \n",
       "L 1825 4091 \n",
       "L 703 3866 \n",
       "L 703 4441 \n",
       "L 1819 4666 \n",
       "L 2450 4666 \n",
       "L 2450 531 \n",
       "L 3481 531 \n",
       "L 3481 0 \n",
       "L 794 0 \n",
       "L 794 531 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_6\">\n",
       "     <g id=\"line2d_6\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"260.302729\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_6\">\n",
       "      <!-- 12.5 -->\n",
       "      <g transform=\"translate(249.169916 239.238437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_7\">\n",
       "     <g id=\"line2d_7\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"300.350576\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_7\">\n",
       "      <!-- 15.0 -->\n",
       "      <g transform=\"translate(289.217763 239.238437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"xtick_8\">\n",
       "     <g id=\"line2d_8\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#m2b48c5b37b\" x=\"340.398423\" y=\"224.64\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_8\">\n",
       "      <!-- 17.5 -->\n",
       "      <g transform=\"translate(329.26561 239.238437)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-37\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"127.246094\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"text_9\">\n",
       "     <!-- time -->\n",
       "     <g transform=\"translate(200.949219 252.916562)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-74\" d=\"M 1172 4494 \n",
       "L 1172 3500 \n",
       "L 2356 3500 \n",
       "L 2356 3053 \n",
       "L 1172 3053 \n",
       "L 1172 1153 \n",
       "Q 1172 725 1289 603 \n",
       "Q 1406 481 1766 481 \n",
       "L 2356 481 \n",
       "L 2356 0 \n",
       "L 1766 0 \n",
       "Q 1100 0 847 248 \n",
       "Q 594 497 594 1153 \n",
       "L 594 3053 \n",
       "L 172 3053 \n",
       "L 172 3500 \n",
       "L 594 3500 \n",
       "L 594 4494 \n",
       "L 1172 4494 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-69\" d=\"M 603 3500 \n",
       "L 1178 3500 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 3500 \n",
       "z\n",
       "M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 4134 \n",
       "L 603 4134 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-6d\" d=\"M 3328 2828 \n",
       "Q 3544 3216 3844 3400 \n",
       "Q 4144 3584 4550 3584 \n",
       "Q 5097 3584 5394 3201 \n",
       "Q 5691 2819 5691 2113 \n",
       "L 5691 0 \n",
       "L 5113 0 \n",
       "L 5113 2094 \n",
       "Q 5113 2597 4934 2840 \n",
       "Q 4756 3084 4391 3084 \n",
       "Q 3944 3084 3684 2787 \n",
       "Q 3425 2491 3425 1978 \n",
       "L 3425 0 \n",
       "L 2847 0 \n",
       "L 2847 2094 \n",
       "Q 2847 2600 2669 2842 \n",
       "Q 2491 3084 2119 3084 \n",
       "Q 1678 3084 1418 2786 \n",
       "Q 1159 2488 1159 1978 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 3500 \n",
       "L 1159 3500 \n",
       "L 1159 2956 \n",
       "Q 1356 3278 1631 3431 \n",
       "Q 1906 3584 2284 3584 \n",
       "Q 2666 3584 2933 3390 \n",
       "Q 3200 3197 3328 2828 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-65\" d=\"M 3597 1894 \n",
       "L 3597 1613 \n",
       "L 953 1613 \n",
       "Q 991 1019 1311 708 \n",
       "Q 1631 397 2203 397 \n",
       "Q 2534 397 2845 478 \n",
       "Q 3156 559 3463 722 \n",
       "L 3463 178 \n",
       "Q 3153 47 2828 -22 \n",
       "Q 2503 -91 2169 -91 \n",
       "Q 1331 -91 842 396 \n",
       "Q 353 884 353 1716 \n",
       "Q 353 2575 817 3079 \n",
       "Q 1281 3584 2069 3584 \n",
       "Q 2775 3584 3186 3129 \n",
       "Q 3597 2675 3597 1894 \n",
       "z\n",
       "M 3022 2063 \n",
       "Q 3016 2534 2758 2815 \n",
       "Q 2500 3097 2075 3097 \n",
       "Q 1594 3097 1305 2825 \n",
       "Q 1016 2553 972 2059 \n",
       "L 3022 2063 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-74\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-69\" x=\"39.208984\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6d\" x=\"66.992188\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-65\" x=\"164.404297\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"matplotlib.axis_2\">\n",
       "    <g id=\"ytick_1\">\n",
       "     <g id=\"line2d_9\">\n",
       "      <defs>\n",
       "       <path id=\"mf2119df055\" d=\"M 0 0 \n",
       "L -3.5 0 \n",
       "\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </defs>\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"199.150622\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_10\">\n",
       "      <!-- −0.75 -->\n",
       "      <g transform=\"translate(7.2 202.949841)scale(0.1 -0.1)\">\n",
       "       <defs>\n",
       "        <path id=\"DejaVuSans-2212\" d=\"M 678 2272 \n",
       "L 4684 2272 \n",
       "L 4684 1741 \n",
       "L 678 1741 \n",
       "L 678 2272 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       </defs>\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-37\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_2\">\n",
       "     <g id=\"line2d_10\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"173.141053\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_11\">\n",
       "      <!-- −0.50 -->\n",
       "      <g transform=\"translate(7.2 176.940271)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_3\">\n",
       "     <g id=\"line2d_11\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"147.131483\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_12\">\n",
       "      <!-- −0.25 -->\n",
       "      <g transform=\"translate(7.2 150.930702)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-2212\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"83.789062\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"147.412109\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"179.199219\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"242.822266\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_4\">\n",
       "     <g id=\"line2d_12\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"121.121914\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_13\">\n",
       "      <!-- 0.00 -->\n",
       "      <g transform=\"translate(15.579688 124.921133)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_5\">\n",
       "     <g id=\"line2d_13\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"95.112344\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_14\">\n",
       "      <!-- 0.25 -->\n",
       "      <g transform=\"translate(15.579688 98.911563)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-32\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_6\">\n",
       "     <g id=\"line2d_14\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"69.102775\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_15\">\n",
       "      <!-- 0.50 -->\n",
       "      <g transform=\"translate(15.579688 72.901994)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_7\">\n",
       "     <g id=\"line2d_15\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"43.093206\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_16\">\n",
       "      <!-- 0.75 -->\n",
       "      <g transform=\"translate(15.579688 46.892424)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-30\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-37\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-35\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"ytick_8\">\n",
       "     <g id=\"line2d_16\">\n",
       "      <g>\n",
       "       <use xlink:href=\"#mf2119df055\" x=\"44.845313\" y=\"17.083636\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "     <g id=\"text_17\">\n",
       "      <!-- 1.00 -->\n",
       "      <g transform=\"translate(15.579688 20.882855)scale(0.1 -0.1)\">\n",
       "       <use xlink:href=\"#DejaVuSans-31\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-2e\" x=\"63.623047\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"95.410156\"/>\n",
       "       <use xlink:href=\"#DejaVuSans-30\" x=\"159.033203\"/>\n",
       "      </g>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "   <g id=\"line2d_17\">\n",
       "    <path d=\"M 60.063494 17.083636 \n",
       "L 76.082633 18.124019 \n",
       "L 92.101772 19.153998 \n",
       "L 108.120911 20.173677 \n",
       "L 124.140049 21.18316 \n",
       "L 140.159188 22.182547 \n",
       "L 156.178327 23.171941 \n",
       "L 172.197466 24.151441 \n",
       "L 188.216604 25.121145 \n",
       "L 204.235743 26.081153 \n",
       "L 220.254882 27.031561 \n",
       "L 236.274021 27.972464 \n",
       "L 252.293159 28.903959 \n",
       "L 268.312298 29.826138 \n",
       "L 284.331437 30.739096 \n",
       "L 300.350576 31.642924 \n",
       "L 316.369714 32.537714 \n",
       "L 332.388853 33.423556 \n",
       "L 348.407992 34.30054 \n",
       "L 364.427131 35.168753 \n",
       "\" clip-path=\"url(#pf14f2cab3e)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"line2d_18\">\n",
       "    <path d=\"M 60.063494 17.083636 \n",
       "L 76.082633 27.487464 \n",
       "L 92.101772 36.850909 \n",
       "L 108.120911 45.27801 \n",
       "L 124.140049 52.8624 \n",
       "L 140.159188 59.688351 \n",
       "L 156.178327 65.831708 \n",
       "L 172.197466 71.360728 \n",
       "L 188.216604 76.336847 \n",
       "L 204.235743 80.815354 \n",
       "L 220.254882 84.84601 \n",
       "L 236.274021 88.4736 \n",
       "L 252.293159 91.738431 \n",
       "L 268.312298 94.67678 \n",
       "L 284.331437 97.321293 \n",
       "L 300.350576 99.701355 \n",
       "L 316.369714 101.843411 \n",
       "L 332.388853 103.771261 \n",
       "L 348.407992 105.506327 \n",
       "L 364.427131 107.067885 \n",
       "\" clip-path=\"url(#pf14f2cab3e)\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"line2d_19\">\n",
       "    <path d=\"M 60.063494 17.083636 \n",
       "L 76.082633 121.121914 \n",
       "L 92.101772 121.121914 \n",
       "L 108.120911 121.121914 \n",
       "L 124.140049 121.121914 \n",
       "L 140.159188 121.121914 \n",
       "L 156.178327 121.121914 \n",
       "L 172.197466 121.121914 \n",
       "L 188.216604 121.121914 \n",
       "L 204.235743 121.121914 \n",
       "L 220.254882 121.121914 \n",
       "L 236.274021 121.121914 \n",
       "L 252.293159 121.121914 \n",
       "L 268.312298 121.121914 \n",
       "L 284.331437 121.121914 \n",
       "L 300.350576 121.121914 \n",
       "L 316.369714 121.121914 \n",
       "L 332.388853 121.121914 \n",
       "L 348.407992 121.121914 \n",
       "L 364.427131 121.121914 \n",
       "\" clip-path=\"url(#pf14f2cab3e)\" style=\"fill: none; stroke: #2ca02c; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"line2d_20\">\n",
       "    <path d=\"M 60.063494 17.083636 \n",
       "L 76.082633 214.756364 \n",
       "L 92.101772 36.850909 \n",
       "L 108.120911 196.965818 \n",
       "L 124.140049 52.8624 \n",
       "L 140.159188 182.555476 \n",
       "L 156.178327 65.831708 \n",
       "L 172.197466 170.883099 \n",
       "L 188.216604 76.336847 \n",
       "L 204.235743 161.428474 \n",
       "L 220.254882 84.84601 \n",
       "L 236.274021 153.770228 \n",
       "L 252.293159 91.738431 \n",
       "L 268.312298 147.567048 \n",
       "L 284.331437 97.321293 \n",
       "L 300.350576 142.542473 \n",
       "L 316.369714 101.843411 \n",
       "L 332.388853 138.472566 \n",
       "L 348.407992 105.506327 \n",
       "L 364.427131 135.175942 \n",
       "\" clip-path=\"url(#pf14f2cab3e)\" style=\"fill: none; stroke: #d62728; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_3\">\n",
       "    <path d=\"M 44.845313 224.64 \n",
       "L 44.845313 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_4\">\n",
       "    <path d=\"M 379.645313 224.64 \n",
       "L 379.645313 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_5\">\n",
       "    <path d=\"M 44.845312 224.64 \n",
       "L 379.645313 224.64 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"patch_6\">\n",
       "    <path d=\"M 44.845312 7.2 \n",
       "L 379.645313 7.2 \n",
       "\" style=\"fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square\"/>\n",
       "   </g>\n",
       "   <g id=\"legend_1\">\n",
       "    <g id=\"patch_7\">\n",
       "     <path d=\"M 259.809375 219.64 \n",
       "L 372.645313 219.64 \n",
       "Q 374.645313 219.64 374.645313 217.64 \n",
       "L 374.645313 159.9275 \n",
       "Q 374.645313 157.9275 372.645313 157.9275 \n",
       "L 259.809375 157.9275 \n",
       "Q 257.809375 157.9275 257.809375 159.9275 \n",
       "L 257.809375 217.64 \n",
       "Q 257.809375 219.64 259.809375 219.64 \n",
       "z\n",
       "\" style=\"fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter\"/>\n",
       "    </g>\n",
       "    <g id=\"line2d_21\">\n",
       "     <path d=\"M 261.809375 166.025937 \n",
       "L 271.809375 166.025937 \n",
       "L 281.809375 166.025937 \n",
       "\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_18\">\n",
       "     <!-- lambda = 0.10 -->\n",
       "     <g transform=\"translate(289.809375 169.525937)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-6c\" d=\"M 603 4863 \n",
       "L 1178 4863 \n",
       "L 1178 0 \n",
       "L 603 0 \n",
       "L 603 4863 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-61\" d=\"M 2194 1759 \n",
       "Q 1497 1759 1228 1600 \n",
       "Q 959 1441 959 1056 \n",
       "Q 959 750 1161 570 \n",
       "Q 1363 391 1709 391 \n",
       "Q 2188 391 2477 730 \n",
       "Q 2766 1069 2766 1631 \n",
       "L 2766 1759 \n",
       "L 2194 1759 \n",
       "z\n",
       "M 3341 1997 \n",
       "L 3341 0 \n",
       "L 2766 0 \n",
       "L 2766 531 \n",
       "Q 2569 213 2275 61 \n",
       "Q 1981 -91 1556 -91 \n",
       "Q 1019 -91 701 211 \n",
       "Q 384 513 384 1019 \n",
       "Q 384 1609 779 1909 \n",
       "Q 1175 2209 1959 2209 \n",
       "L 2766 2209 \n",
       "L 2766 2266 \n",
       "Q 2766 2663 2505 2880 \n",
       "Q 2244 3097 1772 3097 \n",
       "Q 1472 3097 1187 3025 \n",
       "Q 903 2953 641 2809 \n",
       "L 641 3341 \n",
       "Q 956 3463 1253 3523 \n",
       "Q 1550 3584 1831 3584 \n",
       "Q 2591 3584 2966 3190 \n",
       "Q 3341 2797 3341 1997 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-62\" d=\"M 3116 1747 \n",
       "Q 3116 2381 2855 2742 \n",
       "Q 2594 3103 2138 3103 \n",
       "Q 1681 3103 1420 2742 \n",
       "Q 1159 2381 1159 1747 \n",
       "Q 1159 1113 1420 752 \n",
       "Q 1681 391 2138 391 \n",
       "Q 2594 391 2855 752 \n",
       "Q 3116 1113 3116 1747 \n",
       "z\n",
       "M 1159 2969 \n",
       "Q 1341 3281 1617 3432 \n",
       "Q 1894 3584 2278 3584 \n",
       "Q 2916 3584 3314 3078 \n",
       "Q 3713 2572 3713 1747 \n",
       "Q 3713 922 3314 415 \n",
       "Q 2916 -91 2278 -91 \n",
       "Q 1894 -91 1617 61 \n",
       "Q 1341 213 1159 525 \n",
       "L 1159 0 \n",
       "L 581 0 \n",
       "L 581 4863 \n",
       "L 1159 4863 \n",
       "L 1159 2969 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-64\" d=\"M 2906 2969 \n",
       "L 2906 4863 \n",
       "L 3481 4863 \n",
       "L 3481 0 \n",
       "L 2906 0 \n",
       "L 2906 525 \n",
       "Q 2725 213 2448 61 \n",
       "Q 2172 -91 1784 -91 \n",
       "Q 1150 -91 751 415 \n",
       "Q 353 922 353 1747 \n",
       "Q 353 2572 751 3078 \n",
       "Q 1150 3584 1784 3584 \n",
       "Q 2172 3584 2448 3432 \n",
       "Q 2725 3281 2906 2969 \n",
       "z\n",
       "M 947 1747 \n",
       "Q 947 1113 1208 752 \n",
       "Q 1469 391 1925 391 \n",
       "Q 2381 391 2643 752 \n",
       "Q 2906 1113 2906 1747 \n",
       "Q 2906 2381 2643 2742 \n",
       "Q 2381 3103 1925 3103 \n",
       "Q 1469 3103 1208 2742 \n",
       "Q 947 2381 947 1747 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-20\" transform=\"scale(0.015625)\"/>\n",
       "       <path id=\"DejaVuSans-3d\" d=\"M 678 2906 \n",
       "L 4684 2906 \n",
       "L 4684 2381 \n",
       "L 678 2381 \n",
       "L 678 2906 \n",
       "z\n",
       "M 678 1631 \n",
       "L 4684 1631 \n",
       "L 4684 1100 \n",
       "L 678 1100 \n",
       "L 678 1631 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6d\" x=\"89.0625\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-62\" x=\"186.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-64\" x=\"249.951172\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"313.427734\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"374.707031\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"406.494141\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"490.283203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"522.070312\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"585.693359\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"617.480469\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"681.103516\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_22\">\n",
       "     <path d=\"M 261.809375 180.704062 \n",
       "L 271.809375 180.704062 \n",
       "L 281.809375 180.704062 \n",
       "\" style=\"fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_19\">\n",
       "     <!-- lambda = 1.00 -->\n",
       "     <g transform=\"translate(289.809375 184.204062)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6d\" x=\"89.0625\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-62\" x=\"186.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-64\" x=\"249.951172\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"313.427734\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"374.707031\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"406.494141\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"490.283203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"522.070312\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"585.693359\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"617.480469\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"681.103516\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_23\">\n",
       "     <path d=\"M 261.809375 195.382187 \n",
       "L 271.809375 195.382187 \n",
       "L 281.809375 195.382187 \n",
       "\" style=\"fill: none; stroke: #2ca02c; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_20\">\n",
       "     <!-- lambda = 10.00 -->\n",
       "     <g transform=\"translate(289.809375 198.882187)scale(0.1 -0.1)\">\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6d\" x=\"89.0625\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-62\" x=\"186.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-64\" x=\"249.951172\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"313.427734\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"374.707031\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"406.494141\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"490.283203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"522.070312\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"585.693359\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"649.316406\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"681.103516\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"744.726562\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "    <g id=\"line2d_24\">\n",
       "     <path d=\"M 261.809375 210.060312 \n",
       "L 271.809375 210.060312 \n",
       "L 281.809375 210.060312 \n",
       "\" style=\"fill: none; stroke: #d62728; stroke-width: 1.5; stroke-linecap: square\"/>\n",
       "    </g>\n",
       "    <g id=\"text_21\">\n",
       "     <!-- lambda = 19.00 -->\n",
       "     <g transform=\"translate(289.809375 213.560312)scale(0.1 -0.1)\">\n",
       "      <defs>\n",
       "       <path id=\"DejaVuSans-39\" d=\"M 703 97 \n",
       "L 703 672 \n",
       "Q 941 559 1184 500 \n",
       "Q 1428 441 1663 441 \n",
       "Q 2288 441 2617 861 \n",
       "Q 2947 1281 2994 2138 \n",
       "Q 2813 1869 2534 1725 \n",
       "Q 2256 1581 1919 1581 \n",
       "Q 1219 1581 811 2004 \n",
       "Q 403 2428 403 3163 \n",
       "Q 403 3881 828 4315 \n",
       "Q 1253 4750 1959 4750 \n",
       "Q 2769 4750 3195 4129 \n",
       "Q 3622 3509 3622 2328 \n",
       "Q 3622 1225 3098 567 \n",
       "Q 2575 -91 1691 -91 \n",
       "Q 1453 -91 1209 -44 \n",
       "Q 966 3 703 97 \n",
       "z\n",
       "M 1959 2075 \n",
       "Q 2384 2075 2632 2365 \n",
       "Q 2881 2656 2881 3163 \n",
       "Q 2881 3666 2632 3958 \n",
       "Q 2384 4250 1959 4250 \n",
       "Q 1534 4250 1286 3958 \n",
       "Q 1038 3666 1038 3163 \n",
       "Q 1038 2656 1286 2365 \n",
       "Q 1534 2075 1959 2075 \n",
       "z\n",
       "\" transform=\"scale(0.015625)\"/>\n",
       "      </defs>\n",
       "      <use xlink:href=\"#DejaVuSans-6c\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"27.783203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-6d\" x=\"89.0625\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-62\" x=\"186.474609\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-64\" x=\"249.951172\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-61\" x=\"313.427734\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"374.707031\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-3d\" x=\"406.494141\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-20\" x=\"490.283203\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-31\" x=\"522.070312\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-39\" x=\"585.693359\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-2e\" x=\"649.316406\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"681.103516\"/>\n",
       "      <use xlink:href=\"#DejaVuSans-30\" x=\"744.726562\"/>\n",
       "     </g>\n",
       "    </g>\n",
       "   </g>\n",
       "  </g>\n",
       " </g>\n",
       " <defs>\n",
       "  <clipPath id=\"pf14f2cab3e\">\n",
       "   <rect x=\"44.845313\" y=\"7.2\" width=\"334.8\" height=\"217.44\"/>\n",
       "  </clipPath>\n",
       " </defs>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "lambdas = [0.1, 1, 10, 19]\n",
    "eta = 0.1\n",
    "d2l.set_figsize((6, 4))\n",
    "for lam in lambdas:\n",
    "    t = d2l.arange(20).asnumpy()\n",
    "    d2l.plt.plot(t, (1 - eta * lam) ** t, label=f'lambda = {lam:.2f}')\n",
    "d2l.plt.xlabel('time')\n",
    "d2l.plt.legend();"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d5850a00",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
